我很难在AVD上运行一个简单的hello world项目。在控制台中它说:
"[2014-07-14 21:32:56 - TryApp] Installing TryApp.apk...
[2014-07-14 21:35:09 - TryApp] Failed to install TryApp.apk on device 'emulator-5554!
[2014-07-14 21:35:09 - TryApp] (null)
[2014-07-14 21:35:09 - TryApp] Launch canceled!"
当我第一次创建项目时,控制台也有一些警告:
"[2014-07-14 21:26:01 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Marcatus X\workspace\appcompat_v7\bin\jarlist.cache
[2014-07-14 21:26:01 - appcompat_v7] WARNING: unable to write jarlist cache file C:\Users\Marcatus X\workspace\appcompat_v7\bin\jarlist.cache"
我相信我正确安装了eclipse和adt。 ADT捆绑包有一些问题所以我必须单独下载所有内容并将它们放在同一个文件夹中。日食说它的Luna,并安装了最新的Android SDK工具23.0.2。
我很感激帮助我开展Android开发。
这是logcat错误:
07-15 02:48:47.680: I/Process(834): Sending signal. PID: 834 SIG: 9
07-15 02:51:16.800: D/AndroidRuntime(876): Shutting down VM
07-15 02:51:16.800: W/dalvikvm(876): threadid=1: thread exiting with uncaught exception (group=0xb3ac5d70)
07-15 02:51:16.840: E/AndroidRuntime(876): FATAL EXCEPTION: main
07-15 02:51:16.840: E/AndroidRuntime(876): Process: com.example.tryapp, PID: 876
07-15 02:51:16.840: E/AndroidRuntime(876): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.tryapp/com.example.tryapp.MainActivity}: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2197)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2258)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread.access$800(ActivityThread.java:138)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1209)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.os.Handler.dispatchMessage(Handler.java:102)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.os.Looper.loop(Looper.java:136)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread.main(ActivityThread.java:5026)
07-15 02:51:16.840: E/AndroidRuntime(876): at java.lang.reflect.Method.invokeNative(Native Method)
07-15 02:51:16.840: E/AndroidRuntime(876): at java.lang.reflect.Method.invoke(Method.java:515)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
07-15 02:51:16.840: E/AndroidRuntime(876): at dalvik.system.NativeStart.main(Native Method)
07-15 02:51:16.840: E/AndroidRuntime(876): Caused by: android.util.AndroidRuntimeException: You cannot combine swipe dismissal and the action bar.
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:275)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2872)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3129)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:303)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.Activity.setContentView(Activity.java:1930)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
07-15 02:51:16.840: E/AndroidRuntime(876): at com.example.tryapp.MainActivity.onCreate(MainActivity.java:14)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.Activity.performCreate(Activity.java:5242)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-15 02:51:16.840: E/AndroidRuntime(876): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
07-15 02:51:16.840: E/AndroidRuntime(876): ... 11 more
答案 0 :(得分:0)
尝试将目标sdk版本更改为19
不要将API等级20和平台4.4W用作Android虚拟设备。在ADV上设置Level 19和Platform 4.2.2,一切都按预期运行。