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:

artsoft

Active Member
Licensed User
Longtime User
Current solution for me - without crashes at app start:
  • Working only on Java 14 (also for calling SDK manager)
  • Working on newest maven lib files (re-installed via SDK manager)
  • Complete removing ( ! ) of any AppCompatActivity (all references, includes and activity extensions)
  • Only working on this theme: @android:style/Theme.Material
  • But in my case (not for you I guess) I need my own gradient resource (as a gradient background in each activity).
    So I created a new resource "mygradient.xml" in order to use it as a resource style item:
    B4X:
            SetApplicationAttribute(android:theme, "@style/MyAppTheme")
           CreateResource(values, theme.xml,
            <resources>
                <style name="MyAppTheme" parent="@android:style/Theme.Material">
                    <item name="android:windowBackground">@drawable/mygradient</item>
                </style>
            </resources>
    )
Not the best solution ... I know ... but this helps me currently to work without any crashes.

By the way: The #MultiDex: True property was already set in my app.


Best regards.
 
Upvote 0
Top