Error importing Eclipse project into Android Studio

I am trying to import a project executed in Eclipse into Android Studio. When importing, I get the following error:

"There are unrecoverable errors which must be corrected first" Library reference ../../../../workspace/android-support-v7-appcompat could not be found 

I tried to copy the appcompat folder to the project root directory, still the same error. How can I solve it?

See screenshot for more details. error details

+5
source share
2 answers

Finally, I found a way. I opened the project.properties file in a text editor and deleted the line associated with appcompat . Then I managed to import the project without errors. After a successful import, I added appcompat as a dependency, as Gabriele Mariotti responded. Thanks to Gabriela Mariotti.

+19
source

Do not copy the appcompat library as a module in Android Studio.

Just add this dependency to the app / build.gradle file:

 dependencies { compile "com.android.support:appcompat-v7:21.0.3" } 

If the structure of your project:

 root app build.gradle <-- here build.gradle //top level 
+5
source

Source: https://habr.com/ru/post/1214094/


All Articles