Android Question java.lang.NoClassDefFoundError

Hello to all dear friends,
When I compile the project and the application is opened in the simulator, a force close occurs and this log is printed:
B4X:
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:1439)
    at android.widget.TextView.<init>(TextView.java:704)
    at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:108)
    at androidx.appcompat.widget.AppCompatTextView.<init>(AppCompatTextView.java:103)
    at androidx.appcompat.app.AppCompatViewInflater.createTextView(AppCompatViewInflater.java:201)
    at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:121)
    at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1569)
    at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1620)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
    at com.robohorse.pagerbullet.PagerBullet.init(PagerBullet.java:119)
    at com.robohorse.pagerbullet.PagerBullet.<init>(PagerBullet.java:40)
    at com.porya.pagerbullet.PagerBulletWrapper._initialize(PagerBulletWrapper.java:62)
    at com.porya.pagerbullet.PagerBulletWrapper.Initialize(PagerBulletWrapper.java:54)
    at com.test.myapp.main._desine_page4(main.java:1366)
    at com.test.myapp.main$ResumableSub_hd1_host_ResponseBody.resume(main.java:2040)
    at com.test.myapp.main._hd1_host_responsebody(main.java:1913)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1085)
    at anywheresoftware.b4a.keywords.Common.CallSubNew3(Common.java:1048)
    at com.test.myapp.sadegh_lib$ResumableSub_hd_host_onNext.resume(sadegh_lib.java:200)
    at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1717)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6121)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.emoji2.viewsintegration.EmojiTextViewHelper" on path: DexPathList[[zip file "/data/app/com.test.myapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.test.myapp-1/lib/x86_64, /system/lib64, /vendor/lib64]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 40 mor
I installed emoji2 using SDKManager.
I also tried to solve the error like this:
B4X:
    #AdditionalJar: androidx.emoji2:emoji2
    #AdditionalJar: ndroidx.emoji2:emoji2-views-helper
    #AdditionalJar: androidx.emoji2:emoji2-views
    #AdditionalJar: androidx.emoji2:emoji2-bundled
But this problem still exists.
 
Update to B4A v12.0 with an updated SDK.
I deleted the previous b4a a few minutes ago and installed the latest version, but the error is still not resolved. I use the same sdk that you put on the b4a installation page. How to update the sdk? Open the SDKManager and tick all the not installed options and then click the install button?
 
Upvote 0

adriano.freitas

Active Member
No, don't touch SDK Manager. You need to download the two components from the beta thread and unpack them in a new folder.
Hi! I'm having the same problem and I did all the procedures when installing the new BETA version, updated SDK, etc). Any suggestion?
 
Upvote 0

adriano.freitas

Active Member
If you are getting the error in the first post then your SDK is misconfigured. Delete it and download the two components from the beta thread.
Hi.

Before posting here I had already done this several times! (The problem does not occur when compiling but when running the application).
 
Upvote 0

adriano.freitas

Active Member
If you are getting the error in the first post then your SDK is misconfigured. Delete it and download the two components from the beta thread.
When I try to run the application in debug mode, another error appears:

B4X:
Cannot get methods of class: anywheresoftware.b4a.objects.B4XViewWrapper.XUI, disabling cache.

For now, I'll return to the previous version (to be able to finish a job without wasting time). I'll try again soon (I've already changed computers, installed and reinstalled several times)...
 
Upvote 0

Antonio Ferreira

Member
Licensed User
Longtime User
I had the same problem with B4a 12.0
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/emoji2/viewsintegration/EmojiTextViewHelper

After remove #Extends: android.support.v7.app.AppCompatActivity my appp runs on B4A12.0
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…