Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Cannot Import Modules after upgrade

I've just upgraded Android Studio to 0.2.11 but now i can no longer import modules (such as how the Facebook SDK is supposed to be imported

Messed Up Project Structure

I'm pretty sure when i click on Project Structure it should be more like this (with project settings on the left)

Correct Project Structure

like image 826
Matt Avatar asked Oct 04 '13 14:10

Matt


People also ask

Can we import module from source in Android Studio?

Select the source directory of the Module you want to import and click Finish. Open Project Structure Dialog (You can open the PSD by selecting File > Project Structure) and from the left panel click on Dependencies. Select the module from the Module(Middle) section In which you want to add module dependency.

How do I import a module into gradle?

In Android Studio, Right-clicking on the folder to add as library. Editing the dependencies in the build. gradle file, adding: compile fileTree(dir: 'libs', include: '*. jar')}

What is module Android studio?

Modules. A module is a collection of source files and build settings that allow you to divide your project into discrete units of functionality. Your project can have one or many modules, and one module may use another module as a dependency. You can independently build, test, and debug each module.


1 Answers

Make sure you're using gradle 1.8. In your screenshot, looks like you're using 1.6.

Importing a project using the Android Gradle plug-in 0.6.1 and Gradle 1.6 or 1.7 will show the error: "Cannot create directory .idea". The real cause of the project import failure is that this version of the Android Gradle plug-in only supports Gradle 1.8 or later.

From http://tools.android.com/knownissues

like image 96
Chris_C Avatar answered Sep 29 '22 18:09

Chris_C