2014-11-14 83 views
2

我有問題。運行和我調試程序時,我有找不到appcompat_v7.apk和android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880)

[2014-11-14 03:57:23 - Traffic] Android Launch! 
[2014-11-14 03:57:23 - Traffic] adb is running normally. 
[2014-11-14 03:57:23 - Traffic] Performing com.fuad.traffic.MainActivity activity launch 
[2014-11-14 03:57:26 - Traffic] Uploading Traffic.apk onto device 'YT910DUTNU' 
[2014-11-14 03:57:26 - Traffic] Installing Traffic.apk... 
[2014-11-14 03:57:33 - Traffic] Success! 
[2014-11-14 03:57:33 - appcompat_v7] Could not find appcompat_v7.apk! 
[2014-11-14 03:57:33 - Traffic] Starting activity com.fuad.traffic.MainActivity on device YT910DUTNU 

這是我的問題,當我在電話運行此我再次有問題,這樣我的問題

11-14 19:10:02.090: W/dalvikvm(28725): Unable to resolve superclass of Lcom/fuad/traffic/MainActivity; (83) 
11-14 19:10:02.090: W/dalvikvm(28725): Link of class 'Lcom/fuad/traffic/MainActivity;' failed 
11-14 19:10:02.090: W/dalvikvm(28725): threadid=1: thread exiting with uncaught exception (group=0x40b019f0) 
11-14 19:10:02.100: E/AndroidRuntime(28725): FATAL EXCEPTION: main 
11-14 19:10:02.100: E/AndroidRuntime(28725): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.fuad.traffic/com.fuad.traffic.MainActivity}: java.lang.ClassNotFoundException: com.fuad.traffic.MainActivity 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1880) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread.access$600(ActivityThread.java:123) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.os.Handler.dispatchMessage(Handler.java:99) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.os.Looper.loop(Looper.java:137) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread.main(ActivityThread.java:4424) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at java.lang.reflect.Method.invokeNative(Native Method) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at java.lang.reflect.Method.invoke(Method.java:511) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at dalvik.system.NativeStart.main(Native Method) 
11-14 19:10:02.100: E/AndroidRuntime(28725): Caused by: java.lang.ClassNotFoundException: com.fuad.traffic.MainActivity 
11-14 19:10:02.100: E/AndroidRuntime(28725): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 
11-14 19:10:02.100: E/AndroidRuntime(28725): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 
11-14 19:10:02.100: E/AndroidRuntime(28725): ... 11 more 

thanx的主人在stackoverflow.com: D

+0

檢查套件名稱... – duggu 2014-11-14 12:12:49

+0

有你導入它在你的工作空間? – 2014-11-14 12:14:54

+0

我已經找到了問題,在屬性> java構建路徑>項目,問題是有文件夾appcompat。它必須刪除。當我刪除它的工作。 – user3001890 2014-11-14 12:29:09

回答

0

導入appcompat_v7後,請檢查其屬性android部分,並確保Is Library已被選中!然後將appcompat_v7項目添加到項目>屬性> android的項目中,然後清理並重建項目!

0

嘗試:

  1. 右鍵單擊Package Explorer中
  2. 進口
  3. 的Android>將現有Android代碼到工作空間>接下來
  4. 瀏覽>〜/ SDK /演員/安卓/支持/ V7/appcompat
  5. 選擇包裝。複選框「複製項目到工作區」>完成
  6. 右鍵點擊你的項目>屬性> Android的
  7. 在圖書館的部分>添加>程序兼容性> OK
  8. 最後轉到項目(在Eclipse的菜單)>清潔..

告訴我們,如果你嘗試過什麼,發生了什麼事

0

爲@mohammad,我已經發現了這個問題,在屬性> Java構建路徑>項目,問題是有有文件夾程序兼容性。它必須刪除。當我刪除它的工作。但是當我運行的下一個問題的程序是像這樣明顯

'11-14 19:24:44.379: W/dalvikvm(29518): VFY: unable to resolve virtual method 292: Landroid/app/Notification$Builder;.setPriority (I)Landroid/app/Notification$Builder; 
11-14 19:24:44.379: W/dalvikvm(29518): threadid=1: thread exiting with uncaught exception (group=0x40b019f0) 
11-14 19:24:44.389: E/AndroidRuntime(29518): FATAL EXCEPTION: main 
11-14 19:24:44.389: E/AndroidRuntime(29518): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fuad.traffic/com.fuad.traffic.MainActivity}: android.view.InflateException: Binary XML file line #15: Error inflating class fragment 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread.access$600(ActivityThread.java:123) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.os.Handler.dispatchMessage(Handler.java:99) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.os.Looper.loop(Looper.java:137) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread.main(ActivityThread.java:4424) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at java.lang.reflect.Method.invokeNative(Native Method) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at java.lang.reflect.Method.invoke(Method.java:511) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:817) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at dalvik.system.NativeStart.main(Native Method) 
11-14 19:24:44.389: E/AndroidRuntime(29518): Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class fragment 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.rInflate(LayoutInflater.java:739) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.inflate(LayoutInflater.java:352) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:268) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.Activity.setContentView(Activity.java:1837) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.fuad.traffic.MainActivity.onCreate(MainActivity.java:15) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.Activity.performCreate(Activity.java:4470) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 
11-14 19:24:44.389: E/AndroidRuntime(29518): ... 11 more 
11-14 19:24:44.389: E/AndroidRuntime(29518): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 6111000 but found 0. You must have the following declaration within the <application> element:  <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.common.GooglePlayServicesUtil.E(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.internal.u.S(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.internal.u.R(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.SupportMapFragment$b.my(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.dynamic.a.a(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.dynamic.a.onInflate(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2158) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:297) 
11-14 19:24:44.389: E/AndroidRuntime(29518): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:669) 
11-14 19:24:44.389: E/AndroidRuntime(29518): ... 21 more 
'