android studio导入eclipse项目

网上下载一个老工程,.project文件里有eclipse。

android studio导入eclipse项目

eclipse项目结构

Android studio文件结构

下面是导入步骤:

第一步,打开一个项目。

选择File->New->Import Project

第二步,选择Eclipse项目根目录文件夹

第三步,默认选择如下选项,点击Finish

根据提示点击Add google Maven repository and sync project

AS会自动检查是否需要对某些文件重构,如果有点击DO Refactor再次编译

如果碰到错误:Could not find method compile() for arguments

Could not find method compile() for arguments com.android.support:support-v4:32.+ ...

解决:将 compile 改为 implementation 即可!

如果提示错误:Could not find any version that matches com.android.support:appcompat-v4....

就改成这样:

implementation 'com.android.support:support-v4:+'

编译成功,运行成功!

参考链接:https://blog.csdn.net/Unixeyes/article/details/129815410

相关推荐
疯华整猫11 分钟前
删掉 LeakCanary 那天,我用 Trae 自己撸了一套:最难的不是分析堆,是决定什么时候 dump
android·人工智能·性能优化
mmsx8 小时前
耳切法切带洞多边形:论文能跑通,真实数据为什么崩
android·kotlin
洞见前行8 小时前
你的 Activity 关了,为什么还活着?Android 内存泄漏从发现、定位到线上治理
android·性能优化·leakcanary
Kapaseker9 小时前
Kotlin 又要加语法糖了:这次轮到 if-else
android·kotlin
恋猫de小郭11 小时前
Flutter 3.50 & Dart 3.14 发布,快来看看有什么更新吧
android·前端·flutter
Starry-sky(jing)1 天前
Vidda ADB 开启:R Pro 65 找不到开发者选项的处理与连接验收
android·adb·远程控制·电视·vidda
雨白1 天前
从原理到实践:使用 Kotlin KSP 仿写 ButterKnifeLite
android·kotlin
疯华整猫1 天前
把二十七个 init 从首帧前面搬走:用 Trae 把启动优化钉进 CI
android·性能优化·ai编程