我最近将 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.
我试过了
不完全确定还需要做什么.
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:
创建一个库项目并确保所需的 JAR 文件包含在项目的构建路径中:
Create a library project and ensure the required JAR files are included in the project's build path:
您现在拥有一个用于所选支持库的库项目,您可以将其与一个或多个应用程序项目一起使用.
You now have a library project for your selected Support Library that you can use with one or more application projects.
这篇关于包 android.support.v4.app 不存在;在安卓工作室 0.8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
为什么在 Eclipse 的 SDK 中选择 Android API 而不是 Why would you choose Android API over Google APIs in the SDK on Eclipse?(为什么在 Eclipse 的 SDK 中选择 Android API 而不是 Google API?)
Couchbase 存储桶身份验证错误Couchbase Bucket authentication error(Couchbase 存储桶身份验证错误)
admob 6.2.1 空指针异常admob 6.2.1 nullpointer exception(admob 6.2.1 空指针异常)
如何在 IntelliJ IDEA 中设置 SDK?How to setup SDK in IntelliJ IDEA?(如何在 IntelliJ IDEA 中设置 SDK?)
eclipse 无法检测到我的手机进行试运行My phone cannot be detected in eclipse to test run(eclipse 无法检测到我的手机进行试运行)
android SDK 中缺少 platform-toolsaapt.exe 目录platform-toolsaapt.exe directory missing in android SDK(android SDK 中缺少 platform-toolsaapt.exe 目录)