膨胀类android.support.constraint.ConstraintLayout

时间:2019-07-07 08:42:29

标签: android android-constraintlayout inflate-exception

android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2193)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243)
                      at android.app.ActivityThread.access$800(ActivityThread.java:135)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:136)
                      at android.app.ActivityThread.main(ActivityThread.java:5019)
                      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:779)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                      at dalvik.system.NativeStart.main(Native Method)
                   Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout
                      at android.view.LayoutInflater.createView(LayoutInflater.java:620)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                      at com.example.ansari.myapplication.MainActivity.onCreate(MainActivity.java:11)
                      at android.app.Activity.performCreate(Activity.java:5231)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243) 
                      at android.app.ActivityThread.access$800(ActivityThread.java:135) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                      at android.os.Looper.loop(Looper.java:136) 
                      at android.app.ActivityThread.main(ActivityThread.java:5019) 
                      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:779) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
                      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:423)
                      at android.view.LayoutInflater.createView(LayoutInflater.java:594)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:469) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) 
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
                      at com.example.ansari.myapplication.MainActivity.onCreate(MainActivity.java:11) 
                      at android.app.Activity.performCreate(Activity.java:5231) 
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) 
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2157) 
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2243) 
                      at android.app.ActivityThread.access$800(ActivityThread.java:135) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                      at android.os.Looper.loop(Looper.java:136) 
                      at android.app.ActivityThread.main(ActivityThread.java:5019) 
                      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:779) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 
                      at dalvik.system.NativeStart.main(Native Method) 
                   Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f060054 a=-1 r=0x7f060054}
                      at android.content.res.Resources.loadDrawable(Resources.java:2068)
                      at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
                      at android.view.View.<init>(View.java:3554)
                      at android.view.View.<init>(View.java:3484)
                      at android.view.ViewGroup.<init>(ViewGroup.java:464)
                      at android.support.constraint.ConstraintLayout.<init>

0 个答案:

没有答案