Android Question NoClassDefFoundError error and force close app

How do I fix this error that occurs after opening the app?
B4X:
activityhome_activity_create (java line: 486)
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:1746)
    at android.widget.TextView.<init>(TextView.java:1066)
    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.tryCreateView(LayoutInflater.java:1065)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:660)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
    at com.google.android.material.navigation.NavigationBarItemView.<init>(NavigationBarItemView.java:135)
    at com.google.android.material.bottomnavigation.BottomNavigationItemView.<init>(BottomNavigationItemView.java:34)
    at com.google.android.material.bottomnavigation.BottomNavigationMenuView.createNavigationBarItemView(BottomNavigationMenuView.java:196)
    at com.google.android.material.navigation.NavigationBarMenuView.getNewItem(NavigationBarMenuView.java:789)
    at com.google.android.material.navigation.NavigationBarMenuView.buildMenuView(NavigationBarMenuView.java:705)
    at com.google.android.material.navigation.NavigationBarPresenter.updateMenuView(NavigationBarPresenter.java:72)
    at androidx.appcompat.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:292)
    at androidx.appcompat.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1065)
    at androidx.appcompat.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:1092)
    at com.google.android.material.navigation.NavigationBarMenu.addInternal(NavigationBarMenu.java:81)
    at androidx.appcompat.view.menu.MenuBuilder.add(MenuBuilder.java:478)
    at de.amberhome.objects.appcompat.ACMenuWrapper.AddWithGroup2(ACMenuWrapper.java:77)
    at de.amberhome.objects.appcompat.ACMenuWrapper.Add2(ACMenuWrapper.java:62)
    at com.myapp.b4atest.activityhome._activity_create(activityhome.java:486)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:221)
    at com.myapp.b4atest.activityhome.afterFirstLayout(activityhome.java:106)
    at com.myapp.b4atest.activityhome.access$000(activityhome.java:18)
    at com.myapp.b4atest.activityhome$WaitForLayout.run(activityhome.java:84)
    at android.os.Handler.handleCallback(Handler.java:942)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7872)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.ClassNotFoundException: androidx.emoji2.viewsintegration.EmojiTextViewHelper
    ... 46 more
I am using B4A 12.80 and SDK compatible with this version (I have already installed everything from b4x.com)
 
Add:
B4X:
#AdditionalJar: androidx.emoji:emoji
Unfortunately, it has not been fixed yet and the following error still occurs:
B4X:
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/emoji2/viewsintegration/EmojiTextViewHelper;
I checked and found that this error occurs when the following codes are executed:
B4X:
Dim  DSB As DSBottomNavigationView
DSB.Initialize("DSB")
DSB.Visible =True
DSB.Menu.Add2(1, 1,Utils.CSS("Home"), xml.GetDrawable("home_variant")).Checked = True
 
Upvote 0
Top