将Eclipse代码导入到AndroidStudio出现错误

来源:互联网 发布:网络主播黑名单有谁 编辑:程序博客网 时间:2024/06/03 23:41

转载请标明出处:http://blog.csdn.net/xx326664162/article/details/50809559 文章出自:薛瑄的博客

你也可以查看我的其他同类文章,也会让你有一定的收货!

将Eclipse项目导入到AndroidStudio:

http://www.cnblogs.com/ct2011/p/4183553.html

在上文介绍的第二种方式,使用全新的Android Gradle Project,在导入过程出现下面这个错误:

Loading the eclipse project generated the following warnings . if the
errors are recoverable you can proceed with the import . when done , it
will open a report which explains how the old project was mapped to the
new gradle-style project , and any subsequent manual steps .

问题:

这里写图片描述

描述信息意思是,IPNCSDK文件夹,去项目路径下一看,显示的是IPNCSDK_1文件夹,于是我把IPNCSDK_1文件夹,名称改为IPNCSDK

再次导入,有提示PNCSDK_1文件夹找不到,后来又用Eclipse打开项目,查看项目的Library,发现如图的情况

这里写图片描述

有这三个Library,虽然红色×号的没有用到,但是Android Studio 依然要求提供这个文件夹,第三个红色×号Library,在绝对路径找到了那个文件夹,所以没有报它的错误

解决:
选中红色×号Library,点击右侧Remove,再次导入到Android Studio就没有问题了。

1 1