問(wèn)題描述
我一直在瀏覽開(kāi)發(fā)者網(wǎng)站上的 android 教程,并在嘗試向操作欄添加操作時(shí)運(yùn)行(我正在使用支持庫(kù)來(lái)支持 2.1+ 版本),我不斷收到錯(cuò)誤 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
!.
盡管操作欄沒(méi)有我添加的按鈕,但該應(yīng)用程序仍然可以運(yùn)行和運(yùn)行.我已閱讀有關(guān)此問(wèn)題的其他帖子,并確保將 android-support-v7-appcompat 作為庫(kù)包含在內(nèi).
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.
有什么我需要添加到構(gòu)建路徑的(不是按順序?qū)С觯乙呀?jīng)在那里檢查了它)?
Is there anything I need to add to the build path (not in order and export I already have it checked off there)?
謝謝!忘了提到我正在使用 eclipse,以防不清楚.在閱讀了更多帖子之后,我的應(yīng)用程序仍然運(yùn)行似乎很奇怪,因?yàn)槠渌羞@個(gè)問(wèn)題的人都崩潰了.
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" 手動(dòng)添加字符串a(chǎn)ction_search" - 如果這是自動(dòng)添加的使用 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?
下面的完整控制臺(tái)輸出:
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
推薦答案
轉(zhuǎn)到 Java Build Path > Projects 并刪除不正確的項(xiàng)目依賴項(xiàng)(您的 Android 庫(kù)項(xiàng)目.)請(qǐng)注意,在項(xiàng)目設(shè)置的Android"部分中您所依賴的 Android 庫(kù)必須列在 ~"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.
這篇關(guān)于Android 找不到 android-support-v7-appcompat.apk 錯(cuò)誤的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!