久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

包 android.support.v4.app 不存在;在安卓工作室 0.8

package android.support.v4.app does not exist ; in Android studio 0.8(包 android.support.v4.app 不存在;在安卓工作室 0.8)
本文介紹了包 android.support.v4.app 不存在;在安卓工作室 0.8的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我最近將 android studio IDE 更新到 0.8 以使用新的 android L SDK.首先,我導入了一個完成的 android 項目,該項目在舊版本的 android studio 中沒有收到任何錯誤.在 0.8 版 i 行如

I've recently updated the android studio IDE to 0.8 to work with the new android L SDK. To start I imported a finished android project that receives no errors in the older version of android studio. In version 0.8 i lines such as

導入android.support.v4.app.Fragment;
獲取:無法解決支持,導致其余代碼出現錯誤.logcat 返回 101 個

import android.support.v4.app.Fragment;
get: Support cannot be resolved causing the rest of the code to have errors. The logcat returns 101 instances of

Error:(8, 30) error: package android.support.v4.app does not exist

每次我在導入語句中調用支持庫時為 1.

1 for each time I call the support library in an import statement.

我試過了

  • 重新安裝 IDE
  • 刪除idea文件夾的內容
  • 正在安裝所有 SDK - 包括支持庫
  • 同步 gradle
  • 手動將支持庫復制到 libs 文件夾中
  • 重建項目
  • 以及創建一個新項目來測試庫

不完全確定還需要做什么.

not entirely sure what's left to do.

推薦答案

[由于某些原因,此答案與 Eclipse 相關,而不是 Android Studio!]

您是否嘗試過將支持庫設置為您的類路徑?這個鏈接來自 Android 開發者的網站有一些關于如何做到這一點的信息.

Have you tried setting the support libraries to your class path? This link from the Android Developer's website has some info on how to do that.

嘗試從網站上執行以下步驟:

Try following these steps from the website:

根據支持庫代碼創建庫項目:

Create a library project based on the support library code:

  • 確保您已使用 SDK 管理器下載了 Android 支持庫.
  • 創建一個庫項目并確保所需的 JAR 文件包含在項目的構建路徑中:

  • Make sure you have downloaded the Android Support Library using the SDK Manager.
  • Create a library project and ensure the required JAR files are included in the project's build path:

  • 選擇文件>導入.
  • 選擇 Eexisting Android Code Into Workspace 并點擊下一步.
  • 瀏覽至 SDK 安裝目錄,然后瀏覽至 Support Library 文件夾.例如,如果您要添加 appcompat 項目,請瀏覽到/extras/android/support/v7/appcompat/.
  • 單擊完成"導入項目.對于 v7 appcompat 項目,您現在應該會看到一個名為 android-support-v7-appcompat 的新項目.
  • 在新的庫項目中,展開 libs/ 文件夾,右鍵單擊每個 .jar 文件并選擇 Build Path > Add to Build Path.例如,在創建 v7 appcompat 項目時,將 android-support-v4.jar 和 android-support-v7-appcompat.jar 文件都添加到構建路徑中.
  • 右鍵單擊庫項目文件夾并選擇構建路徑>配置構建路徑.
  • Order and Export 選項卡中,檢查您剛剛添加到構建路徑的 .jar 文件,以便它們可用于依賴此庫項目的項目.例如,appcompat 項目要求您同時導出 android-support-v4.jar 和 android-support-v7-appcompat.jar 文件.
  • 取消選中 Android 依賴項.
  • 單擊確定"完成更改.
  • Select File > Import.
  • Select Existing Android Code Into Workspace and click Next.
  • Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to /extras/android/support/v7/appcompat/.
  • Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
  • In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
  • Right-click the library project folder and select Build Path > Configure Build Path.
  • In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
  • Uncheck Android Dependencies.
  • Click OK to complete the changes.

您現在擁有一個用于所選支持庫的庫項目,您可以將其與一個或多個應用程序項目一起使用.

You now have a library project for your selected Support Library that you can use with one or more application projects.

  • 將庫添加到您的應用程序項目中:
  • Project Explorer 中,右鍵單擊您的項目并選擇 Properties.
  • 在對話框左側的類別面板中,選擇Android.
  • 窗格中,點擊添加按鈕.
  • 選擇庫項目并單擊確定".例如,appcompat 項目應列為 android-support-v7-appcompat.
  • 在屬性窗口中,單擊確定".
  • Add the library to your application project:
  • In the Project Explorer, right-click your project and select Properties.
  • In the category panel on the left side of the dialog, select Android.
  • In the Library pane, click the Add button.
  • Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  • In the properties window, click OK.

這篇關于包 android.support.v4.app 不存在;在安卓工作室 0.8的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Why would you choose Android API over Google APIs in the SDK on Eclipse?(為什么在 Eclipse 的 SDK 中選擇 Android API 而不是 Google API?)
Couchbase Bucket authentication error(Couchbase 存儲桶身份驗證錯誤)
admob 6.2.1 nullpointer exception(admob 6.2.1 空指針異常)
How to setup SDK in IntelliJ IDEA?(如何在 IntelliJ IDEA 中設置 SDK?)
My phone cannot be detected in eclipse to test run(eclipse 無法檢測到我的手機進行試運行)
platform-toolsaapt.exe directory missing in android SDK(android SDK 中缺少 platform-toolsaapt.exe 目錄)
主站蜘蛛池模板: 国产成人免费视频 | 五月婷婷综合在线 | 国产一级二级 | 一道本av| 国产在线观看网站 | 日本亚洲欧美 | 亚洲精品一区二区三区在线观看 | 一级免费片 | 欧美精品三区 | 亚洲一级二级三级 | 国产乱码精品一区二区三 | 午夜一级片 | www.欧美日韩 | 欧美一区二| 国产乱码精品一区二区三 | 国产超碰在线观看 | 日韩免费视频 | 91亚洲国产成人精品性色 | 深夜在线视频 | 中文字幕一二区 | 男人添女荫道口图片 | 国产中文字幕一区二区 | 国产成人免费观看 | 亚洲一区二区三区在线视频 | 亚洲激情在线视频 | 黄色片一区二区 | 亚洲一区中文 | 黄色欧美视频 | 亚洲一区二区欧美 | 日本三级久久 | 艳妇乳肉豪妇荡乳 | 成人免费看片' | 艳妇乳肉豪妇荡乳 | 中文字幕在线免费观看 | 日韩激情网站 | 国产精品成人一区二区三区 | 欧美专区在线观看 | 欧美伊人久久 | 狠狠操av | 成人动漫一区二区 | 不卡视频一区二区 |