Android Question FirebaseUI error

hanyelmehy

Active Member
Licensed User
Longtime User
when i tru FirebaseUI Example i get this error
B4X:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fbuitest/com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
    at android.app.ActivityThread.access$900(ActivityThread.java:177)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:145)
    at android.app.ActivityThread.main(ActivityThread.java:5942)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
    at com.firebase.ui.auth.ui.idp.AuthMethodPickerActivity.onCreate(AuthMethodPickerActivity.java:70)
    at android.app.Activity.performCreate(Activity.java:6283)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
    ... 10 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.constraint.ConstraintLayout" on path: DexPathList[[zip file "/data/app/com.fbuitest-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    at android.view.LayoutInflater.createView(LayoutInflater.java:578)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
    ... 19 more
    Suppressed: java.lang.ClassNotFoundException: android.support.constraint.ConstraintLayout
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 22 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
 

DonManfred

Expert
Licensed User
Longtime User
ConstraintLayout is a component which needs to get installed with the SDKManager.

Dont know if it helps though. I tried my example here and got a different error. I then checked the Github project and it seems that it is completely rewritten.

I need to further investigate.
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
I have just gone through an exercise to get this posting of mine converted so that it works with B4A 9.5. I had the same error initially i.e

B4X:
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout

Then:
1. Installed the below via the SDK Manager
2. Changed wrapper dependencies to
B4X:
@DependsOn(values={"com.android.support:support-annotations", "com.android.support:support-v4", "constraintlayout-1.1.3.aar", "constraintlayout-solver-1.1.3"})
3. Copied constraintlayout-1.1.3.aar and constraintlayout-solver-1.1.3.jar to my additional libs folder
4. Extracted classes.jar from constraintlayout-1.1.3.aar and added it to the libs folder of my wrapper
5. Added constraintlayout-solver-1.1.3.jar to the libs folder of my wrapper
6. Recompiled the library
7. Refreshed libraries in B4A, Jetified, and cleaned project
8. Changed the layout file where necessary from:
B4X:
android.support.constraint.ConstraintLayout
.....to....
B4X:
androidx.constraintlayout.widget.ConstraintLayout
8. Enabled AppCompat V4.00 (@corwin42 's library)

LiveEdgeDetection is now again compiling and working again on my device.


1577867939345.png
 
Upvote 0
Top