問題描述
我一直在瀏覽開發者網站上的 android 教程,并在嘗試向操作欄添加操作時運行(我正在使用支持庫來支持 2.1+ 版本),我不斷收到錯誤 android-support-v7-appcompat] 找不到 android-support-v7-appcompat.apk
!.
I have been going though the android tutorial on the developer site, and have run while trying to add actions to the Action bar (I am using the Support Library to support version 2.1+), I keep getting the error android-support-v7-appcompat] Could not find android-support-v7-appcompat.apk
!.
盡管操作欄沒有我添加的按鈕,但該應用程序仍然可以運行和運行.我已閱讀有關此問題的其他帖子,并確保將 android-support-v7-appcompat 作為庫包含在內.
The app still runs and functions, though the Action bar does not have the buttons I added. I've read other posts on this issue, and made sure that I included android-support-v7-appcompat as a library.
有什么我需要添加到構建路徑的(不是按順序導出,我已經在那里檢查了它)?
Is there anything I need to add to the build path (not in order and export I already have it checked off there)?
謝謝!忘了提到我正在使用 eclipse,以防不清楚.在閱讀了更多帖子之后,我的應用程序仍然運行似乎很奇怪,因為其他有這個問題的人都崩潰了.
Thanks! Forgot to mention that I am using eclipse in case it wasn't clear. After digging around reading some more posts, it seems strange that my app still runs since others with this problem have theirs crash.
注意:不確定這是否重要,但我必須在 main_activity_actions.xml(在 res/menu/中)中為 android:title = "@string/action_search" 手動添加字符串action_search" - 如果這是自動添加的使用 appcompat?
NOTE: Not sure if this matters but I had to manually add the string "action_search" for android:title = "@string/action_search" in main_activity_actions.xml (in res/menu/)- should this have been added automatically with appcompat?
下面的完整控制臺輸出:
Full console output below:
[2013-08-24 13:19:04 - MyFirstApp1] Android Launch!
[2013-08-24 13:19:04 - MyFirstApp1] adb is running normally.
[2013-08-24 13:19:04 - MyFirstApp1] Performing com.example.myfirstapp1.MainActivity activity launch
[2013-08-24 13:19:04 - MyFirstApp1] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD1'
[2013-08-24 13:19:04 - MyFirstApp1] Uploading MyFirstApp1.apk onto device 'emulator-5554'
[2013-08-24 13:19:04 - MyFirstApp1] Installing MyFirstApp1.apk...
[2013-08-24 13:19:08 - MyFirstApp1] Success!
[2013-08-24 13:19:08 - android-support-v7-appcompat] Could not find android-support-v7-appcompat.apk!
[2013-08-24 13:19:08 - MyFirstApp1] Starting activity com.example.myfirstapp1.MainActivity on device emulator-5554
[2013-08-24 13:19:09 - MyFirstApp1] ActivityManager: Starting: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
cmp=com.example.myfirstapp1/.MainActivity
推薦答案
轉到 Java Build Path > Projects 并刪除不正確的項目依賴項(您的 Android 庫項目.)請注意,在項目設置的Android"部分中您所依賴的 Android 庫必須列在 ~"Libraries" 框中.
Go to Java Build Path > Projects and remove the incorrect project dependency (your Android library project.) Note that in the "Android" section of the project settings the Android library that you're dependent on must be listed in the ~"Libraries" box.
這篇關于Android 找不到 android-support-v7-appcompat.apk 錯誤的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!