dev-juyoung / CroPicker

CroPicker is album and image Picker Library for Android. Supports import a list of Albums and support multiple image selection.
18 stars 4 forks source link

Android API 17 Error (org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector) #1

Closed naisanhamza88 closed 7 years ago

naisanhamza88 commented 7 years ago

Hi Dears I have this Error On Android API Level 17

java.lang.RuntimeException: Unable to start activity ComponentInfo{moments.com.arabsooq/xyz.dev_juyoung.cropicker.activities.DirectoryActivity}: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2441) at android.app.ActivityThread.access$900(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:5345) 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:828) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644) at dalvik.system.NativeStart.main(Native Method) Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013 at android.content.res.Resources.loadDrawable(Resources.java:2152) at android.content.res.Resources.getDrawable(Resources.java:710) at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374) at xyz.dev_juyoung.cropicker.base.CroPickerActivity.setupToolbar(CroPickerActivity.java:94) at xyz.dev_juyoung.cropicker.activities.DirectoryActivity.setupToolbar(DirectoryActivity.java:48) at xyz.dev_juyoung.cropicker.base.CroPickerActivity.setContentView(CroPickerActivity.java:52) at xyz.dev_juyoung.cropicker.activities.DirectoryActivity.onCreate(DirectoryActivity.java:37) at android.app.Activity.performCreate(Activity.java:5343) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2441)  at android.app.ActivityThread.access$900(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5345)  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:828)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)  at dalvik.system.NativeStart.main(Native Method)  Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933) at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877) at android.content.res.Resources.loadDrawable(Resources.java:2148) at android.content.res.Resources.getDrawable(Resources.java:710)  at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)  at xyz.dev_juyoung.cropicker.base.CroPickerActivity.setupToolbar(CroPickerActivity.java:94)  at xyz.dev_juyoung.cropicker.activities.DirectoryActivity.setupToolbar(DirectoryActivity.java:48)  at xyz.dev_juyoung.cropicker.base.CroPickerActivity.setContentView(CroPickerActivity.java:52)  at xyz.dev_juyoung.cropicker.activities.DirectoryActivity.onCreate(DirectoryActivity.java:37)  at android.app.Activity.performCreate(Activity.java:5343)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1088)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2441)  at android.app.ActivityThread.access$900(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)  at android.os.Handler.dispatchMessage(Handler.java:110)  at android.os.Looper.loop(Looper.java:193)  at android.app.ActivityThread.main(ActivityThread.java:5345)  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:828)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:644)  at dalvik.system.NativeStart.main(Native Method) 

dev-juyoung commented 7 years ago

Thank you for using CroPicker and apologize for the inconvenience. And can you attach the used code so I can verify it?

Please wait a day, I will do our best to present a solution!

naisanhamza88 commented 7 years ago

Tanks for prompt response

Kindly find attached Java Class

From: Juyoung, Lee [mailto:notifications@github.com] Sent: Monday, July 10, 2017 3:13 PM To: dev-juyoung/CroPicker CroPicker@noreply.github.com Cc: Hamza Abdullah h.naisan.88@gmail.com; Manual manual@noreply.github.com Subject: Re: [dev-juyoung/CroPicker] Android API 17 Error (org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector) (#1)

Thank you for using CroPicker and apologize for the inconvenience. And can you attach the used code so I can verify it?

Please wait a day, I will do our best to present a solution!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dev-juyoung/CroPicker/issues/1#issuecomment-314087662 , or mute the thread https://github.com/notifications/unsubscribe-auth/ARt98uwGCe_-pnlT3VddhM1HvX5lvUgmks5sMhVDgaJpZM4OSqJt . https://github.com/notifications/beacon/ARt98qm9DA_y7Pf6A71bht0VjNQRMHSgks5sMhVDgaJpZM4OSqJt.gif

dev-juyoung commented 7 years ago

It was a bug that API17 could not find R.dawable.abc_ic_ab_back_material The resource is the file used for the toolbar's back button. I added an alternative file and updated the library version to 1.0.2.

If you change the library version or specify an alternate file using the setToolbarBackArrowDrawable() method, it seems to be resolved.

Please check and leave a comment if the problem is resolved. After waiting for your answer, I will close the issue.

naisanhamza88 commented 7 years ago

it's Worked ,

dev-juyoung commented 7 years ago

Thanks for commented, And there were some issues, so I modified the code a little bit and updated it to version 1.0.3. If you have a problem similar to #2 or #3 , please update the version! :)