Android错误归类
-
- 1、Gradle DSL method not found: 'xxx()'
- 2、Error:failed to find target android-19
- 3、Error:failed to find Build Tools revision 21.1.1
- 4、unable to access android sdk add-on list
- 5、Could not resolve all dependencies for configuration ':classpath'.
- 6、解决Android Studio同步Sync下载超级慢的问题
- 7、ERROR: The SDK Build Tools revision (23.0.2) is too low for project ':app'. Minimum required is 25.0.0
- 8、Emulator: emulator: ERROR: ANDROID_SDK_ROOT is undefined
- 9、Error while waiting for device: The emulator process for AVD phone was killed.
- 10、Installation did not succeed. The application could not be installed. Installation failed due to: 'U
- 11、E/WifiService: enforceCanAccessScanResults: hiding ssid and bssidLocation mode is disabled for the device
- 12、Android Studio 使用USB真机调试教程
- 13、Failed ---com.android.support:appcompat-v7:28.+的问题。
1、Gradle DSL method not found: ‘xxx()’
当前的gradle版本,没有“xxx()”方法,而你项目中直接用了这个method,或者间接用了(比如我们rn项目引用的第三方包里面,用了这个method) 21的这个gradle方法在当前gradle版本中不可用
解决方法:
- 升级gradle版本
- 把对应的方法更改成当前gradle中的方法。
比 如,'compileOnly()‘和’implementation()’ 都可以换成"
compile()" - 删掉最外层的build.gradle中的
android {
compileSdkVersion 19
buildToolsVersion 21.1.1
}
然后重新刷新就ok了
2、Error:failed to find target android-19
3、Error:failed to find Build Tools revision 21.1.1
- 修改 “项目主目录\library\build.gradle”文件,修改为你当前的版本
4、unable to access android sdk add-on list
- 问题:
初次安装Android Studio,启动后,报错。
- 原因:
AS启动后,会在默认路径下检测是否有Android SDK,如果没有的话,就会报上述错误。 - 解决方案
3.1 主动设置SDK
如果本机有Android SDK的话,可以点击cancel跳过,在下一个界面手动选择本地SDK目录。
3.2 跳过检测
在Android Studio的安装目录下,找到\bin\idea.properties
在尾行添加disable.android.first.run=true,表示初次启动不检测SDK
5、Could not resolve all dependencies for configuration ‘:classpath’.
- 原因:更换gradle,引起文件缺失报错 ,更换gradle,使用2.14.1,于是遇到了如下报错。“对 gradle和gradle plugin(gradle插件)”的使用没弄明白。
见AndroidStudi