bug1
问题描述 org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0
-
Could not resolve all artifacts for configuration ‘:classpath’;
-
could not find org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0
以上2种问题描述都是相同的问题
解决方法
将注释掉的jcenter()取消注释,简直奇葩,佛了。重点【已经错两次】
repositories {
google()
maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}//添加
maven{url "https://jitpack.io"}//添加
jcenter()
}
bug2
问题描述
安装android studio报SDK tools directory is missing
参考
安装android studio报SDK tools directory is missing
https://stackoverflow.com/questions/28789556/android-studio-sdk-tools-directory-is-missing
解决 Android Studio 报SDK tools directory is missing
解决方法
-
将别人安装好的SDK复制到自己的SDK路径下
-
Configure->Default Project Structure-> 按照如图所示设定SDK路径。
bug3
问题描述
参考
AndroidStudio对应的Gradle插件从哪来?存放目录在哪?
Android Studio报错:Error:Could not find com.android.tools.build:gradle:4.1 记一次不长记性的坑
解决办法
因此本机的编译工具gradle:4.1.1路径 在如下所示位置。
C:\Users\21738\.gradle\caches\modules-2\files-2.1\com.android.tools.build\builder-model
build.gralde
里的classpath 'com.android.tools.build:gradle:3.0.1'
指的是Android Studio的gradle插件版本,而gradle-wrapper.properties
里的distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
才是指定的gradle版本!
Gradle是开源的自动化构建工具,而Gradle插件是google开发的在Android Studio中使用Gradle的插件。
bug4
build.grade中的阿里仓库虽然设置了,死活下载不成功,进度条疯狂在刷,2-3个小时都在同一个地方卡死。将http改成https【搜这个仓库时发现说这个阿里已经更新所以有这个疯狂的想法】。
// maven{url 'http://maven.aliyun.com/nexus/content/groups/public/'}//添加
maven{url 'https://maven.aliyun.com/nexus/content/groups/public/'}//添加
bug5
参考
解决Android 虚拟机运行The emulator process for AVD was killed.错误。
解决Android 虚拟机运行The emulator process for AVD was killed.错误。
Android studio报错:The emulator process for AVD (xxx) was killed
【Android】the emulator process was killed 以及 ANDROID_SDK_ROOT找不到或broken
原因
是因为用户名为中文,文件路径不能有中文,因此嗯哼~~
虚拟机无法启动
-
设置SDK环境变量,需要重启,对有些电脑来说,因为反应过慢,导致设置变量后无法及时更改,所以需要重启。
-
删除用户文件夹下的.android文件夹。
-
启动虚拟机