1.打开AS后以默认操作导入ES工程,然后会出现一个过不去的进度条后等待2分钟强行终止AS进程。
2.修改文件build.gradle
3.修改文件D:\Android\ESP8266\gradle\wrapper
修改如下:
即:D:/Program Files/Android/Android Studio/gradle/gradle-3.3-all.zip
4.app路径下的build.gradle要整体复制
1 apply plugin: 'com.android.application' 2 3 android { 4 compileSdkVersion 25 5 buildToolsVersion "25.0.0" 6 7 defaultConfig { 8 applicationId "com.example.control_air" 9 minSdkVersion 19 10 targetSdkVersion 25 11 } 12 13 buildTypes { 14 release { 15 minifyEnabled false 16 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 17 } 18 } 19 20 android{compileOptions.encoding="GBK"} 21 } 22 23 dependencies { 24 compile fileTree(dir: 'libs', include: ['*.jar']) 25 androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 26 exclude group: 'com.android.support', module: 'support-annotations' 27 }) 28 compile 'com.android.support:appcompat-v7:25.1.0' 29 testCompile 'junit:junit:4.12' 30 }
5.工程打开后可能出现这种情况
解决之道:
6.开始爽吧。