eclipse项目导入androidstudio

1.添加build.gradle

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
    }
}
apply plugin: 'android'

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile 'com.android.support:recyclerview-v7:22.2.0'
}

android {
    compileSdkVersion 22
    buildToolsVersion '23.0.0 rc2'

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
}

2.点击GradleSync按钮,自动构建编译.

posted @ 2015-07-16 15:52  谈笑风生膜法师  阅读(502)  评论(0编辑  收藏  举报