当先锋百科网

首页 1 2 3 4 5 6 7

报错:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.massage, PID: 4029
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.massage/com.example.massage.MainActivity}: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.widget.RelativeLayout

 

Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class android.widget.RelativeLayout

 

Caused by: android.content.res.Resources$NotFoundException: Resource "com.example.massage:drawable/bg" (7f07005f) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f07005f a=-1 r=0x7f07005f}

参考:

Error inflating class android.widget.LinearLayout

解决:将bg.png及btn_bg.png移动到drawable文件夹下