Android Question Problem running my latest app after upgrade to B4A 12.00

hatzisn

Expert
Licensed User
Longtime User
Good morning everyone,

I followed everything by heart in the instructions of the installation of B4A 12.00 and I tried to compile my latest app.

The app does not even open. I tried to jettyfy the libraries as it is suggested sometimes. Nothing. I could find out what might be wrong but I cannot since until now the debugger does not connect in order to see what is wrong - edit: I had to treaten it and it gave me an error but again it started doing the same things. What should I be looking for?

Here are the libraries that it uses for the biometric access:

#AdditionalJar: androidx.biometric:biometric
#Extends: android.support.v7.app.AppCompatActivity
#AdditionalJar: androidx.arch.core:core-runtime
#AdditionalJar: androidx.appcompat:appcompat

And here is the error

java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/emoji2/viewsintegration/EmojiTextViewHelper;
at androidx.appcompat.widget.AppCompatEmojiTextHelper.<init>(AppCompatEmojiTextHelper.java:43)
at androidx.appcompat.widget.AppCompatTextView.getEmojiTextViewHelper(AppCompatTextView.java:132)
at androidx.appcompat.widget.AppCompatTextView.setFilters(AppCompatTextView.java:219)
at android.widget.TextView.<init>(TextView.java:1947)
at android.widget.TextView.<init>(TextView.java:1258)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:108)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:103)
at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:99)
at androidx.appcompat.widget.Toolbar.setTitle(Toolbar.java:788)
at androidx.appcompat.widget.ToolbarWidgetWrapper.setTitleInt(ToolbarWidgetWrapper.java:262)
at androidx.appcompat.widget.ToolbarWidgetWrapper.setWindowTitle(ToolbarWidgetWrapper.java:244)
at androidx.appcompat.widget.ActionBarOverlayLayout.setWindowTitle(ActionBarOverlayLayout.java:760)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:825)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:698)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:201)
at dhqi.cc.admin.main.onCreate(main.java:62)
at android.app.Activity.performCreate(Activity.java:8290)
at android.app.Activity.performCreate(Activity.java:8270)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4009)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8663)
at java.lang.reflect.Method.invoke(Native Method)
 
Last edited:

Addo

Well-Known Member
Licensed User
Longtime User
make sure you are installing the new sdk as stated in details here
delete your old android sdk and uninstall any b4a version on your computer and start over.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
I do the same regarding the update and I also have the same effect when I try to compile my app:



Is there a need to install a complete new Android Studio????
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
I do the same regarding the update and I also have the same effect when I try to compile my app:

View attachment 136147

Is there a need to install a complete new Android Studio????
Android studio has nothing to do with b4x you need to delete any old sdk you have or create a new Android sdk folder and follow the steps as detailed.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User

Ok, I did it in this way ........ only update of libs that Erel described.

But nothing helped and now I have a big problem: I cannot compile my app.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Hey Thanks!

Biometric is part of AndroidX

So, I use now Java 14 in order to be able to can start SDK Manager ...

I will try to update the AndroidX classes by SDKManager.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User

I already have created a new folder where I unzipped the downloaded files. In order to remove any doubt from me I deleted it and have done this again.
I have also added the biometric library from the SDK Manager as I have done before. Nope. No luck.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Hey Thanks!

Biometric is part of AndroidX

So, I use now Java 14 in order to be able to can start SDK Manager ...

I will try to update the AndroidX classes by SDKManager.

Any luck? Did it work?
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Update:

I could start the SDKManager (this needed an update to Java 14 on my PC / with Java 8 and 11: no way!).
I could update the missing AndroidX maven libs via SDKManager.
I could compile my app.
I could install my app on my mobile device.
I can not start my app - because the app crahes at ones!!!!!! :-( --------- WITHOUT ANY LOGS!!!!!!!!!



I tried to compile with Java 11 ------> No success!
And I dont want to decrease the java version < 11.

@Erel ... What to do now?
 
Last edited:
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
I already have created a new folder where I unzipped the downloaded files. In order to remove any doubt from me I deleted it and have done this again.
I have also added the biometric library from the SDK Manager as I have done before. Nope. No luck.
your error is different than artsoft your error said cannot find
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/emoji2/viewsintegration/EmojiTextViewHelper

which related to this

you need androidx.emoji2 as well
 
Last edited:
Upvote 0

hatzisn

Expert
Licensed User
Longtime User

Can you run this project to check if it works?

 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
well check it out give me some moments
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User

This is exactly my problem.
 
Upvote 0

artsoft

Active Member
Licensed User
Longtime User
Update crash handler on my device:

B4X:
java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics;
    at androidx.savedstate.SavedStateRegistryController$Companion.create(Unknown Source:2)
    at androidx.savedstate.SavedStateRegistryController.create(Unknown Source:2)
    at androidx.activity.ComponentActivity.<init>(ComponentActivity.java:146)
    at androidx.fragment.app.FragmentActivity.<init>(FragmentActivity.java:108)
    at androidx.appcompat.app.AppCompatActivity.<init>(AppCompatActivity.java:94)
    at java.lang.Class.newInstance(Native Method)
    at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
    at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1274)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3637)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3907)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2260)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:210)
    at android.os.Looper.loop(Looper.java:299)
    at android.app.ActivityThread.main(ActivityThread.java:8168)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)
Caused by: java.lang.ClassNotFoundException: kotlin.jvm.internal.Intrinsics
    ... 23 more

What is missing now?
 
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
i did run the example you have provided and i confirm app crashes with that log cat

11-18 16:34:49.911 22163 22163 E AndroidRuntime: Process: b4a.example, PID: 22163
11-18 16:34:49.911 22163 22163 E AndroidRuntime: at b4a.example.main.<init>(main.java:17)

so i have customized the example as following

B4X:
#AdditionalJar: androidx.biometric:biometric
#Extends: androidx.appcompat.app.AppCompatActivity
#AdditionalJar: androidx.arch.core:core-runtime

and selected the internal appcompat library and it runs without crash
 

Attachments

  • BiometricExample.zip
    11.6 KB · Views: 140
Last edited:
Upvote 0

Addo

Well-Known Member
Licensed User
Longtime User
do the steps I mentioned and see attached project..
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User

Thank you for the response and efforts. I will try it as soon as I get back in front of my computer.
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User

I did all those that you mentioned and also added #MultiDex: True (with the previous setup this was not needed) and it seems to compile and start. Thank you... @PassionDEV It would be a good thing to post in the original thread of Biometric a link to your solution in this thread...

@Erel can you please confirm that with what I mentioned it will be ok to use?
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…