Pal*_*lak 31 android gradle android-studio
由于SDK Manager中提供了Android 6.0的新API,因此在应用程序级build.gradle文件中出现了一个提示以进行更新
从
androidTestCompile 'com.android.support:support-annotations:22.0.1'
compile 'com.android.support:appcompat-v7:22.0.1'
Run Code Online (Sandbox Code Playgroud)
至
androidTestCompile 'com.android.support:support-annotations:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
Run Code Online (Sandbox Code Playgroud)
我还没有从Android 6(API 23)的sdk管理器下载新的更新,但仍然更改了以下详细信息,如下所示,
之前
compileSdkVersion 22
buildToolsVersion "22.0.1"
targetSdkVersion 22
androidTestCompile 'com.android.support:support-annotations:22.0.1'
compile 'com.android.support:appcompat-v7:22.0.1'
Run Code Online (Sandbox Code Playgroud)
后
compileSdkVersion 23
buildToolsVersion "23.0.0"
targetSdkVersion 23
androidTestCompile 'com.android.support:support-annotations:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
Run Code Online (Sandbox Code Playgroud)
由于我尚未下载新的API 6.0,因此发生以下错误
Error:Cause: failed to find target with hash string 'android-23' in: C:\Users\DRONE\AppData\Local\Android\sdk
Run Code Online (Sandbox Code Playgroud)
所以我现在再次将应用程序级build.gradle文件中的设置更改为之前的设置,但错误未得到解决.发生了同样的错误.
我现在该怎么解决这个问题?
小智 20
通常它是由于没有API 23引起的.在将SDK更新到较新版本后,它经常会重写build.gradle为提供的最高API版本SDK,即使您没有上传它也是如此.最简单的方法 - 下载API 23.
| 归档时间: |
|
| 查看次数: |
51510 次 |
| 最近记录: |