Android Question App crashing on 4.4 - AppCompat Vector Drawables

konradwalsh

Active Member
Licensed User
Longtime User
Hi
Does anyone know where I start to diagnose these crashes reported by Android 4.4 users

B4X:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sharedfunctions.myclmmworksheet/com.sharedfunctions.myclmmworksheet.main}: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f02004f
    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 #0x7f02004f
    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:346)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:194)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:182)
    at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:717)
    at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:187)
    at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:77)
    at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:127)
    at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:147)
    at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:27)
    at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:50)
    at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:201)
    at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:181)
    at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:521)
    at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
    at com.sharedfunctions.myclmmworksheet.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




AND THE ANSWER IS:

here is the answer for anyone look for it in future

https://b4x.com/android/forum/threa...er-android-versions.48423/page-10#post-433902

Check if the only existing folder in <SDK>\build-tools is the 23.0.3 folder.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Are you using any vector drawable xml in your Resourcedir?
Vectordrawables is a feature of Android 5 (or 6) and maybe not supported on 4.4 Android

res/drawable/abc_vector_test.xml from drawable resource ID #0x7f02004f
 
Upvote 0

konradwalsh

Active Member
Licensed User
Longtime User
the only file in that folder is the icon file

Actually - I did a search and found this -
B4X:
"\Kids Worksheet Source Files\Objects\bin\extra\res2\res\drawable\abc_vector_test.xml"
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
does anyone know how to diagnose or resolve this one?
1. Check the selected libs.
2. copy the jar´s from the selected libs to a temporary folder. "appcompat" lib = appcompat.jar
dialogs lib = dialogs.jar and so on...
3. rename the jar to be an zip file. AppCompat.jar -> appCompat.zip
Do this for all selected libs.
4. Check the content of the zip-files you just got and check if there is such a drawable inside of those zip´s

Hope it helps
 
Upvote 0

konradwalsh

Active Member
Licensed User
Longtime User
Upvote 0
Top