1. android studio 版本 : 3.0.0
Android Studio 下载文件归档 | Android 开发者 | Android Developers (google.cn)
下载地址:
https://redirector.gvt1.com/edgedl/android/studio/install/3.0.0.18/android-studio-ide-171.4408382-windows.exe
2. build.gradle(app) 修改:
compile 'com.android.support:appcompat-v7:26.0.0-beta1'
testCompile 'junit:junit:4.13.2'
compileSdkVersion 26
buildToolsVersion "26.0.2"
build.gradle完整修改如下:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.vonchenchen.usbmuxd_android"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.0.0-beta1'
testCompile 'junit:junit:4.13.2'
}
3.build.gradle(aoa_android)修改如下:
替换仓库为国内的:文章来源:https://www.toymoban.com/news/detail-613631.html
maven { url 'https://maven.aliyun.com/repository/google' }
//central和jcenter的聚合仓库
maven { url 'https://maven.aliyun.com/repository/public' }
//仅顶级build.gradle需配置插件仓库
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
build.gradle(aoa_android)完整修改如下:文章来源地址https://www.toymoban.com/news/detail-613631.html
buildscript {
repositories {
// jcenter()
// maven {
// url 'https://maven.google.com/'
// name 'Google'
// }
maven { url 'https://maven.aliyun.com/repository/google' }
//central和jcenter的聚合仓库
maven { url 'https://maven.aliyun.com/repository/public' }
//仅顶级build.gradle需配置插件仓库
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
allprojects {
repositories {
// jcenter()
// maven {
// url 'https://maven.google.com/'
// name 'Google'
// }
maven { url 'https://maven.aliyun.com/repository/google' }
//central和jcenter的聚合仓库
maven { url 'https://maven.aliyun.com/repository/public' }
//仅顶级build.gradle需配置插件仓库
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
到了这里,关于aoa_android工程编译注意事项的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!