这里是logCat错误。请记住,Android Studio更新至3.0后会发生此问题
AndroidRuntime: FATAL EXCEPTION: main
Process: com.dogarsoft.matrialdesignpractice, PID: 28316
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dogarsoft.matrialdesignpractice/com.dogarsoft.matrialdesignpractice.ActivityHome}: android.view.InflateException: Binary XML file line #18: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2505)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.access$1000(ActivityThread.java:164)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1462)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:5541)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
答案 0 :(得分:0)
在ActivityHome中使用setContentView来检查要放大的布局文件的第18行