我只在发布版本中收到此错误,调试版本工作正常。找不到资源项,@ anroid:drawable / ic_ab_back_material,资源ID
Caused by: android.view.InflateException: Binary XML file line #27: Binary XML file line #27: Error inflating class android.support.v7.widget.Toolbar
Caused by: android.view.InflateException: Binary XML file line #27: Error inflating class android.support.v7.widget.Toolbar
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:645)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:787)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at android.support.v7.app.k.b(Unknown Source)
at android.support.v7.app.c.setContentView(Unknown Source)
at in.reweyou.reweyouforums.ForumMainActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:6684)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)
Caused by: android.content.res.Resources$NotFoundException: Drawable android:drawable/ic_ab_back_material with resource ID #0x1080313
Caused by: android.content.res.Resources$NotFoundException: Can't find ColorStateList from drawable resource ID #0x7f06000a
我的proguard文件:
-dontwarn io.nlopez.**
-dontwarn okio.**
-dontwarn **
-printmapping build/outputs/mapping/release/mapping.txt
-printmapping obfuscation/mapping.txt
# glide
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}