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

相关推荐
冻咸鱼32 分钟前
MySQL中表操作
android·sql·mysql·oracle
技术小黑屋_41 分钟前
从零搭建 Android ADB MCP Server:让 AI 助手直接操控你的 Android 设备
android·adb
2501_915921431 小时前
iOS混淆与IPA加固实战手记,如何构建苹果应用防反编译体系
android·macos·ios·小程序·uni-app·cocoa·iphone
Jeled2 小时前
Android 集成指南:Google 登录、Facebook 登录 与 Firebase 深入接入(实战)
android·kotlin·android studio·memcached·facebook
用户092 小时前
Android唤醒锁优化指南
android·面试·kotlin
aqi003 小时前
FFmpeg开发笔记(八十三)国产的视频裁剪框架AndroidVideoTrimmer
android·ffmpeg·音视频·流媒体
困到晕阙3 小时前
[Zer0pts2020]Can you guess it?
android
写点啥呢4 小时前
android取消每次u盘插入创建无用(媒体)文件夹
android·u盘·车机·aosp
杨筱毅4 小时前
【Android】RecyclerView LayoutManager 重写方法详解
android