我在android studio上制作应用程序,打开布局后我的模拟器停止了,并在logcat上发出此消息:
at com.calcupital.calcupital.VancoFull.onCreate(VancoFull.java:20)
并指出这一行:
setContentView(R.layout.vanco_full);
并告诉我:
02-28 16:07:17.799 1101-1101/com.calcupital.calcupital E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.calcupital.calcupital/com.calcupital.calcupital.VancoFull}: android.view.InflateException: Binary XML file line #8: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class <unknown>
at com.calcupital.calcupital.VancoFull.onCreate(VancoFull.java:20)
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.OutOfMemoryError
奇怪的是,我的手机上的应用程序运行正常! 布局中有一个错误,无法找到它,因为模拟器在启动前停止了!! , 那么这里有什么问题?!!
答案 0 :(得分:0)
&#39;和OutOfMemoryError
为您的模拟器添加更多内存。