码迷,mamicode.com
首页 > 移动开发 > 详细

eclipse项目导入androidstudio

时间:2015-07-16 18:50:56      阅读:117      评论:0      收藏:0      [点我收藏+]

标签:

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按钮,自动构建编译.

eclipse项目导入androidstudio

标签:

原文地址:http://www.cnblogs.com/dennisac/p/4651536.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!