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

相关推荐
奔跑吧 android19 分钟前
【android bluetooth 协议分析 07】【SDP详解 2】【SDP 初始化】
android·bluetooth·aosp15·bt·gd·sdp_init
梦否3 小时前
Android 代码热度统计(概述)
android
xchenhao6 小时前
基于 Flutter 的开源文本 TTS 朗读器(支持 Windows/macOS/Android)
android·windows·flutter·macos·openai·tts·朗读器
coder_pig7 小时前
跟🤡杰哥一起学Flutter (三十五、玩转Flutter滑动机制📱)
android·flutter·harmonyos
消失的旧时光-19438 小时前
OkHttp SSE 完整总结(最终版)
android·okhttp·okhttp sse
ansondroider9 小时前
OpenCV 4.10.0 移植 - Android
android·人工智能·opencv
hsx66611 小时前
Kotlin return@label到底怎么用
android
itgather12 小时前
安卓设备信息查看器 - 源码编译
android
whysqwhw12 小时前
OkHttp之buildSrc模块分析
android
hsx66612 小时前
从源码角度理解Android事件的传递流程
android