将 Eclipse 项目导入 Android Studio 时出错
Error on importing an Eclipse project into Android Studio
我正在尝试将在 Eclipse 中完成的项目导入到 Android Studio。导入时,出现以下错误:
"There are unrecoverable errors which must be corrected first"
Library reference ../../../../workspace/android-support-v7-appcompat could not be found
我试过将appcompat文件夹复制到项目根目录下,还是一样的错误。我该如何解决?
详情请参考截图
不要将 appcompat 库作为模块复制到 Android Studio 中。
只需在您的 app/build.gradle 文件中添加此依赖项:
dependencies {
compile "com.android.support:appcompat-v7:21.0.3"
}
你的项目结构在哪里:
root
app
build.gradle <-- here
build.gradle //top level
最后,我找到了一个方法..我在文本编辑器中打开 project.properties
文件并删除了与 appcompat
相关的行。然后我设法没有错误地导入项目。成功导入后,我添加了 appcompat
作为 Gabriele Mariotti 回答的依赖项。谢谢 Gabriele Mariotti。
我正在尝试将在 Eclipse 中完成的项目导入到 Android Studio。导入时,出现以下错误:
"There are unrecoverable errors which must be corrected first"
Library reference ../../../../workspace/android-support-v7-appcompat could not be found
我试过将appcompat文件夹复制到项目根目录下,还是一样的错误。我该如何解决?
详情请参考截图
不要将 appcompat 库作为模块复制到 Android Studio 中。
只需在您的 app/build.gradle 文件中添加此依赖项:
dependencies {
compile "com.android.support:appcompat-v7:21.0.3"
}
你的项目结构在哪里:
root
app
build.gradle <-- here
build.gradle //top level
最后,我找到了一个方法..我在文本编辑器中打开 project.properties
文件并删除了与 appcompat
相关的行。然后我设法没有错误地导入项目。成功导入后,我添加了 appcompat
作为 Gabriele Mariotti 回答的依赖项。谢谢 Gabriele Mariotti。