安装Android Studio遇到的问题以及解决办法

Android Studio的下载地址:http://www.android-studio.org/

1、gradle一直处于build状态
解决办法:打开项目中的build.gradle文件添加国内的阿里云镜像

buildscript {
    repositories {
//        google()
//        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
        
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.2'
        
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
//        google()
//        jcenter()
        maven {
            url 'https://maven.google.com'
        }
        maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
        
    }

2、NDK Resolution Outcome: Project settings: Gradle model version=XXX, NDK version is UNKNOWN
解决办法:打开File->Project Structure->SDK Location 在Android NDK location一栏点击下载,下载完成后clean project再build project就可以了。

你可能感兴趣的:(安装Android Studio遇到的问题以及解决办法)