【发布时间】:2016-02-18 06:03:03
【问题描述】:
我的代码有问题。我的代码在 Android Studio 中标记为错误代码,但成功构建 gradle 并在设备上运行,如下所示:
当前配置:
- 我当前的项目在依赖项中使用了很多库。但如果 库很少的项目不会像这样标记错误。
- Android Studio 1.5 RC1
- compileSdkVersion 'Google Inc.:Google API:23
- buildToolsVersion '23.0.2'
- 类路径 'com.android.tools.build:gradle:1.3.1'
我已经完成但没有解决问题的活动:
- 始终干净 > 重新构建项目
- 缓存无效/重启>打开Android工作室>打开这个项目
- 关闭android studio > 重启电脑> 再次打开android studio > 打开这个项目
- 更新Android版本和SDK版本 5.卸载Android Studio > 重新安装Android Studio > 打开项目
已编辑:似乎每个来自 android 支持的代码(如 recyclerview、CardView、APPpCompact)都有错误
这是我的依赖
dependencies {
compile project(':android-crop')
compile project(':RTEditor-Toolbar')
compile files('libs/apache-mime4j-0.6.jar')
compile files('libs/httpmime-4.1.3.jar')
compile files('libs/jetbrains-annotations.jar')
compile files('libs/gcm.jar')
//three party library
compile('com.crashlytics.sdk.android:crashlytics:2.5.1@aar') {
transitive = true;
}
compile('cn.trinea.android.view.autoscrollviewpager:android-auto-scroll-view-pager:1.1.2') {
exclude module: 'support-v4'
}
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.vinaysshenoy:mugen:1.0.1'
compile 'com.github.clans:fab:1.5.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.curioustechizen.android-ago:library:1.3.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.github.chrisbanes.photoview:library:+'
compile 'com.subinkrishna:circularimageview:1.0.2'
compile 'me.leolin:ShortcutBadger:1.1.3@aar'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-identity:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'cn.trinea.android.common:trinea-android-common:4.2.15'
compile 'com.sothree.slidinguppanel:library:3.1.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
}
那么如何解决?感谢提前
【问题讨论】:
-
你试过打扫吗?重启安卓工作室?重建? 告诉我们你到目前为止做了什么来尝试解决这个问题
-
还有什么错误信息?也许这只是一些 lint 警告
-
plz alt+ 在红线上输入。
-
如果你写 compileSdkVersion = 23 会怎样
-
还是不行@guillaume_fr
标签: java android android-studio