eclipse 项目 导入到 Android studio 中

1、在eclipse中右击,要导出的项目,选择export

2、选择generate gradle build files ,点击next,再如下图,选择自己要导出的项目

3、点击next ,最后勾选force over......如图


4、点击finish后, 导出的项目会覆盖到工作空间中的原有项目,同时项目中会多一个build.gradle文件。

5.开始使用Android studio 进行项目的导入选择打开一个新的项目


6.在本地选择刚刚导出的项目,同时会提示如下,选择取消,重新配置gradle

6.选择本地的gradle

7.这样就进入到Android studio中,进入后会提示一个如下图的错误,

8、解决此问题,需要两步,

1)将 build.gradle中的

apply plugin: 'android 改为
apply plugin: 'com.android.application'
2)并在该文件中添加下面一段
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

9、添加完后还会抱一个如下图的错误

10、解决此问题需要如下几步



在此操作之后有包一个这样的问题

D:\AndroidStudioProjects\Calendar\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.0\res\values-v21\values-v21.xml

Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.

解决这个问题只需要改项目的api 到21 以上 也就 5.0 以上

做完这下就 ok了 这个项目就能在studio中运行了


  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值