Wednesday 15 August 2012

android - AppCompat V7 crash when using shrinkResources -



android - AppCompat V7 crash when using shrinkResources -

i enabled new tool shrinkresources in gradle project , fails due not find appcompat color xml, removed tool.

11-03 11:30:19.095: e/androidruntime(24797): caused by: android.content.res.resources$notfoundexception: file res/color/abc_primary_text_material_dark.xml color state list resource id #0x7f090192 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.resources.loadcolorstatelist(resources.java:2247) 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.resources.getcolor(resources.java:812) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.internal.widget.tintmanager.getthemeattrcolor(tintmanager.java:325) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.internal.widget.tintmanager.tintdrawable(tintmanager.java:178) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.internal.widget.tintmanager.getdrawable(tintmanager.java:146) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.internal.widget.tinttypedarray.getdrawable(tinttypedarray.java:62) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.widget.toolbar.<init>(toolbar.java:248) 11-03 11:30:19.095: e/androidruntime(24797): @ android.support.v7.widget.toolbar.<init>(toolbar.java:190) 11-03 11:30:19.095: e/androidruntime(24797): ... 27 more 11-03 11:30:19.095: e/androidruntime(24797): caused by: android.content.res.resources$notfoundexception: file res/color/abc_primary_text_material_dark.xml xml type colorstatelist resource id #0x7f090192 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.resources.loadxmlresourceparser(resources.java:2351) 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.resources.loadcolorstatelist(resources.java:2241) 11-03 11:30:19.095: e/androidruntime(24797): ... 34 more 11-03 11:30:19.095: e/androidruntime(24797): caused by: java.io.filenotfoundexception: res/color/abc_primary_text_material_dark.xml 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.assetmanager.openxmlassetnative(native method) 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.assetmanager.openxmlblockasset(assetmanager.java:488) 11-03 11:30:19.095: e/androidruntime(24797): @ android.content.res.resources.loadxmlresourceparser(resources.java:2333) 11-03 11:30:19.095: e/androidruntime(24797): ... 35 more

i added proguard file (remember, proguard mandatory run shirnkresources tool) appcompat v7 seems problem shirnkresources

# support-v7 -dontwarn android.support.v7.** -keep class android.support.v7.internal.** { *; } -keep interface android.support.v7.internal.** { *; }

any idea?

i had similar problem had colors.xml v21 , testing on api 19 device. creating colors.xml fixed issue.

android gradle proguard appcompat

No comments:

Post a Comment