Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception during setContentView #19

Open
LiTe1991 opened this issue Aug 3, 2018 · 3 comments
Open

Exception during setContentView #19

LiTe1991 opened this issue Aug 3, 2018 · 3 comments

Comments

@LiTe1991
Copy link

LiTe1991 commented Aug 3, 2018

Hi,

I want_ to try this lib, but I get an exception. Here is a cutout of the exception.

Caused by: android.view.InflateException: Binary XML file line #115: Error inflating class com.sdsmdg.harjot.vectormaster.VectorMasterView at android.view.LayoutInflater.createView(LayoutInflater.java:613) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270) at android.app.Activity.setContentView(Activity.java:1881) at de.ratiodata.scan4agree21.activity.TonerActivity.onCreate(TonerActivity.java:26) at android.app.Activity.performCreate(Activity.java:5104) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)  at android.app.ActivityThread.access$600(ActivityThread.java:141)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:5041)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:587) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)  at android.app.Activity.setContentView(Activity.java:1881)  at de.ratiodata.scan4agree21.activity.TonerActivity.onCreate(TonerActivity.java:26)  at android.app.Activity.performCreate(Activity.java:5104)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)  at android.app.ActivityThread.access$600(ActivityThread.java:141)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:5041)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)  at dalvik.system.NativeStart.main(Native Method)  Caused by: android.content.res.Resources$NotFoundException: File res/drawable-mdpi-v4/image_toner_singeltoner.png from xml type xml resource ID #0x7f06006b at android.content.res.Resources.loadXmlResourceParser(Resources.java:2186) at android.content.res.Resources.loadXmlResourceParser(Resources.java:2141) at android.content.res.Resources.getXml(Resources.java:902) at com.sdsmdg.harjot.vectormaster.VectorMasterView.buildVectorModel(VectorMasterView.java:86) at com.sdsmdg.harjot.vectormaster.VectorMasterView.init(VectorMasterView.java:75) at com.sdsmdg.harjot.vectormaster.VectorMasterView.<init>(VectorMasterView.java:51) at java.lang.reflect.Constructor.constructNative(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)  at android.view.LayoutInflater.createView(LayoutInflater.java:587)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)  at android.app.Activity.setContentView(Activity.java:1881)  at de.ratiodata.scan4agree21.activity.TonerActivity.onCreate(TonerActivity.java:26)  at android.app.Activity.performCreate(Activity.java:5104)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)  at android.app.ActivityThread.access$600(ActivityThread.java:141)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:5041)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.io.FileNotFoundException: Corrupt XML binary file at android.content.res.AssetManager.openXmlAssetNative(Native Method) at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:487) at android.content.res.Resources.loadXmlResourceParser(Resources.java:2168) at android.content.res.Resources.loadXmlResourceParser(Resources.java:2141)  at android.content.res.Resources.getXml(Resources.java:902)  at com.sdsmdg.harjot.vectormaster.VectorMasterView.buildVectorModel(VectorMasterView.java:86)  at com.sdsmdg.harjot.vectormaster.VectorMasterView.init(VectorMasterView.java:75)  at com.sdsmdg.harjot.vectormaster.VectorMasterView.<init>(VectorMasterView.java:51)  at java.lang.reflect.Constructor.constructNative(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)  at android.view.LayoutInflater.createView(LayoutInflater.java:587)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)  at android.app.Activity.setContentView(Activity.java:1881)  at de.ratiodata.scan4agree21.activity.TonerActivity.onCreate(TonerActivity.java:26)  at android.app.Activity.performCreate(Activity.java:5104)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)  at android.app.ActivityThread.access$600(ActivityThread.java:141)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loop(Looper.java:137)  at android.app.ActivityThread.main(ActivityThread.java:5041)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:511)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)  at dalvik.system.NativeStart.main(Native Method) 

Can you say what it is or where is my mistake?

Best regards
LiTe

@darktiny
Copy link

Same issue here, Android Gradle Plugin convert vector drawable xmls to png files when api level < 24, to resolve the issue, add below config line to your build.gradle

android {
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
}

@priyamprakash
Copy link

Same issue here, Android Gradle Plugin convert vector drawable xmls to png files when api level < 24, to resolve the issue, add below config line to your build.gradle

android {
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
}

this did not work

@HimaniT07
Copy link

Not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants