Removing referenced libraries from project Android Studio

10,449

Solution 1

Generally, clicking on the Sync Project with Gradle Files button should clear up problems, but if they persist, you can close Android Studio, delete all the .idea folders and .iml files in your project and re-import.

Solution 2

There is an official bug on improving this for Android Studio. It includes a bigger description of the problem and a workaround suggested by one of the Android Studio engineers:

Bug description - click on the star button to follow it: https://code.google.com/p/android/issues/detail?id=61510

Google Engineer suggested workaround (note that some of the bugs described are fixed): https://code.google.com/p/android/issues/detail?id=61510#c3

Share:
10,449
Boardy
Author by

Boardy

Develop apps and services in PHP, C#, C++, HTML, CSS, Jquery etc, recently started learning React.

Updated on June 05, 2022

Comments

  • Boardy
    Boardy almost 2 years

    I am trying to get Android Studio to work with library dependencies for my project, I am using Android Studio 0.4.0.

    I've removed the dependecies from the project structure dialogue, from the settings.gradle and from the build.gradle and also from my project.iml file.

    I then delete the directories of the referenced libraries from my main project, but after a few seconds, the referenced library directory reappears but only contains mylibrary.iml file. Everytime I delete it, it reappears again.

    Also when Android Studio loads it displays an error stating that non gradle projects can't be referenced from gradle projects but I no longer want them referenced but somehow I can't get rid of them.

    The project was imported into Android Studio from an Export from Eclipse.

    Thanks for any help you can provide.