aoa_android工程编译注意事项
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 26buildToolsVersion "26.0.2"defaultConfig {applicationId "com.vonchenchen.usbmuxd_android"minSdkVersion 19targetSdkVersion 25versionCode 1versionName "1.0"testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"}buildTypes {release {minifyEnabled falseproguardFiles 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)修改如下:
替换仓库为国内的:
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)完整修改如下:
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
}