首先先检查eclipse项目是否为utf-8格式,因eclipse默认为GBK格式,转入as后会引起乱码
先更改格式,再将项目导出,以gradle形式,如果没有此选项则将adt升级到22再导出
eclipse相应操作为 Window—>Preferences—>General—>Workspace—>Other=UTF-8
导出:
选择项目点击右键 Export—>Android—>Generate Gradle build files—>next..next..
导入到as后在项目级gradle里更换
gradle包
如2.3.3版本AS
classpath
'com.android.tools.build:gradle:2.3.3'
打开gradle/wrapper/gradle-wrapper.properties文件
distributionUrl改为当前工具版本的服务器、
如:
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-3.3-all.zip
接着:
更换sdk为当前版本
File---->Project Structure---->选择项目Properties--->更换Compile Sdk Version和
Bulid Tool Version为最新版本即可
//gradle 变化