Android Question AppCompat and ImageSlider

DonManfred

Expert
Licensed User
Longtime User
I´m trying a app (sdk 22) on an Android 4.2 device.

the project does use AppCompat lib (just checked, no UI objects), the Appcompat Theme and the extends directive
Additionally my ImagSlider library

It crashes with the error shown below:

checkOverflow(1088), More:false, Req:false Child:3
Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
VFY: unable to resolve interface method 16433: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
VFY: replacing opcode 0x72 at 0x0002
VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
VFY: unable to resolve interface method 16435: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
VFY: replacing opcode 0x72 at 0x0002
Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
VFY: unable to resolve interface method 16439: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
VFY: replacing opcode 0x72 at 0x0002
openUserData
Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
VFY: unable to resolve virtual method 544: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
VFY: replacing opcode 0x6e at 0x0002
Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
VFY: unable to resolve virtual method 566: Landroid/content/res/TypedArray;.getType (I)I
VFY: replacing opcode 0x6e at 0x0008
validate
writeElement
commit
Exception while inflating <vector>
org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportWidth > 0
at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:720)
at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:653)
at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:615)
at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:734)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:367)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:131)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:151)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:31)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:55)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
at b4a.example.main.onCreate(main.java:33)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
at android.app.ActivityThread.access$900(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x416abc08)
FATAL EXCEPTION: main
Process: b4a.example, PID: 4488
java.lang.RuntimeException: Unable to start activity ComponentInfo{b4a.example/b4a.example.main}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2413)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2471)
at android.app.ActivityThread.access$900(ActivityThread.java:175)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5602)
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:1283)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052
at android.content.res.Resources.loadDrawable(Resources.java:3440)
at android.content.res.Resources.getDrawable(Resources.java:1917)
at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:202)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:131)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:151)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:31)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:55)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:205)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
at b4a.example.main.onCreate(main.java:33)
at android.app.Activity.performCreate(Activity.java:5451)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2377)
... 11 more
Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:986)
at android.graphics.drawable.Drawable.createFromXml(Drawable.java:930)
at android.content.res.Resources.loadDrawable(Resources.java:3436)
... 30 more

it is missing a abc_vector_test.xml ?

I got the stacktrace in the unfiltered log. In B4A the log was just empty... On the device i just got the message "B4A Example wurde angehalten"

B4A 6.8, Api 25 (Tools Configure Paths)
AppCompat 3.52
targetSdkVersion 22

Is this a problem in AppCompat lib or in Android (support-v7)?
 

corwin42

Expert
Licensed User
Longtime User
Which Android SDK Build Tools do you have installed?

AppCompat uses vector drawables internally and these are only supported (on KitKat and below) if the app is compiled with build tools 23.0.3 or up. If you have any older Android SDK Build tools installed in SDK Manager please try to deinstall them. It should be safe if you only have one of the 25.xx build tools installed.
B4A may use a too old build tools version if it is installed.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
if the app is compiled with build tools 23.0.3 or up
i´m sure i have newer version installed (TOO).

If you have any older Android SDK Build tools installed in SDK Manager please try to deinstall them. It should be safe if you only have one of the 25.xx build tools installed.
Will try your suggestion and let only the 25.xx tools installed.... I´ll report here
 
Upvote 0
Top