Android Question NotificationBuilder AndroidX issues

Yuri Cinesi

Active Member
Licensed User
I'm having some issues compiling my app that uses notification builder after the switch to androidX. It's similar to the issue described in this post (https://www.b4x.com/android/forum/threads/b4a-v9-30-beta-has-been-released.107225/#post-670620). I have however already updated to beta 4 and that hasn't fixed the issue.

And yes I have run the jetifier tool. It seems to close before the bar has gotten to the end however, and I can't find any files with the .androidx extension in the additional libraries folder. Is this normal or is there something wrong with my jetifier tool?

Here's the compiler log:

B4X:
Compiling generated Java code.    Error
B4A line: 124
nb.SetStyle(nbInboxStyle)
javac 1.8.0_101
src\com\infogiovio\app\downloadservice.java:616: error: cannot access NotificationCompat
_nb.SetStyle((androidx.core.app.NotificationCompat.Style)(_nbinboxstyle.getObject()));
                                                                                 ^
  class file for android.support.v4.app.NotificationCompat not found


Edit: I am actually having further issues, here are the crash logs.

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/PopupMenu;
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.PopupMenu" on path: DexPathList[[zip file "/data/app/com.infogiovio.app-1/base.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is this normal or is there something wrong with my jetifier tool?
Not normal. Where is the additional libraries folder stored?

You can run the tool from the command line. It will allow you to see the error message.
B4X:
cd C:\Program Files (x86)\Anywhere Software\Basic4android
java -jar Jetifier.jar c:\Users\H\Documents\AdditionalLibs\B4A

Change the path to the additional libraries as needed.
 
Upvote 0

Yuri Cinesi

Active Member
Licensed User
I bet it's because the folder has a space in it. Testing now.

Scratch that. Here's the error log.

https://imgur.com/8U6YOux
8U6YOux
 
Upvote 0

Yuri Cinesi

Active Member
Licensed User
Using the --illegal-access=warn flag does not fix the issue.
It does not seem related to the folder being in program files as running it in an elevated command prompt doesn't fix it either.
 
Upvote 0
Top