Android Question Error with using Androidx in api 19

Asheune

New Member
Hey guys,
How to solve this problem?
I have B4A 10.6 , AppCompatv4 , target api 29, javac 11
I have no problem with api 21+ , but in api17 and api19 program carshing with this error


B4X:
** Activity (first) Create, isFirst = true **
Cannot get methods of class: androidx.appcompat.widget.AppCompatTextView, disabling cache.
first_activity_create (java line: 438)
java.lang.RuntimeException: Method: setRotationY not found in: androidx.appcompat.widget.AppCompatTextView
    at anywheresoftware.b4j.object.JavaObject$MethodCache.getMethod(JavaObject.java:363)
    at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:120)
    at de.amberhome.appcompat.toolbarmenuexample.parsrtltoolbar._setrotationy(parsrtltoolbar.java:144)
    at de.amberhome.appcompat.toolbarmenuexample.parsrtltoolbar._initacsearchviewlight(parsrtltoolbar.java:77)
    at ir.asheune.nerkh.arz.first._activity_create(first.java:438)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
    at ir.asheune.nerkh.arz.first.afterFirstLayout(first.java:108)
    at ir.asheune.nerkh.arz.first.access$000(first.java:20)
    at ir.asheune.nerkh.arz.first$WaitForLayout.run(first.java:86)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5001)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Method: setRotationY not found in: androidx.appcompat.widget.AppCompatTextView
 

Asheune

New Member
1. Use latest version of B4A.
2. Think carefully if it is worth your time to debug Android 4- issues. These are very old devices. Might be simpler to just set the minSdkVersion to 21.
3. If it is a new project then it is recommended to switch to B4XPages and remove AppCompat.
Yeah.
Thanks for helping.
I use the minSdkVersion 21.
 
Upvote 0
Top