AS gradle
1,Eclipse项目直接导程AndroidStudio项目目录配置:
android{
sourceSets{
main{
manifest.srcFile'AndroidManifest.xml'
java.srcDirs=['src']
resources.srcDirs=['src']
aidl.srcDirs=['src']
renderscript.srcDirs=['src']
res.srcDirs=['res']
assets.srcDirs=['assets']
jni.srcDirs=['libs']
jniLibs.srcDirs=['libs']
}
//Movetheteststotests/java,tests/res,etc...
instrumentTest.setRoot('tests')
//Movethebuildtypestobuild-types/<type>
//Forinstance,build-types/debug/java,build-types/debug/AndroidManifest.xml,...
//Thismovesthemoutofthemdefaultlocationundersrc/<type>/...whichwould
//conflictwithsrc/beingusedbythemainsourceset.
//Addingnewbuildtypesorproductflavorsshouldbeaccompanied
//byasimilarcustomization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
2,aar文件配置,在build.gradle中添加代码:
//aar路径配置
repositories{
flatDir{
dirs'libss'
}
}
compile(name:'mlibrary-debug',ext:'aar')
3,AndroidStudio配置:
a)颜色的配置文件:Darcula_.icls,将该文件中的内容拷贝到C:\Users\jxw3042\.AndroidStudioPreview2.0\config\colors该目录下的.icls文件中去。
b)config.zip解压后替换C:\Users\jxw3042\.AndroidStudioPreview2.0\config\该文件夹。【config.zip】