eclipse项目导入到Android Studio

最近实验要交报告,但是电脑上只有Android Studio,l老师给的项目是基于eclipse构建的,遇到的一些坑给大家参考;

一.项目的导入,

import  project    选择你要导入的工程文件夹路径,一路next

 二,导入之后发现报错:

原因是;build.gradle   缺少了 google()  添加上即可  如图所示

三.点击make project    ok可以了然后又报错:

Lint found fatal errors while assembling a release target.

To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

解决方法 :这个错误报告会生成在 app /build/reports/lint-results-yourBuildName-fatal.html 打开这个网页,可以看到详细的错误信息,修改起来就简单了。

然后我的原因是:

 在 app-build.gradle中删除这个配置信息即可  然后make project 错误解决

四。那么没报错了,但是程序还是跑不起来,

解决方法: file --project structure 删除modules

退出Android Stuido,重新打开该项目 

                           。 

欧克,导入成功。。

参考博文:

https://blog.csdn.net/baidu_38607919/article/details/80595483 

https://blog.csdn.net/xx326664162/article/details/81779475 

猜你喜欢

转载自blog.csdn.net/qq_40707685/article/details/88749055