Siavash Abdoli
Siavash Abdoli

Reputation: 1862

how to import library and modules to android studio properly

I want to use this library (https://github.com/ikimuhendis/LDrawer) in my project. but when i import it as new modules i can't see where it is? and then some gradle error occur like this:

cant find runProguard

and then i replaced this with minifyEnabled then this error occur "change gradle version Error:Library projects cannot set applicationId. applicationId is set to in default config"

then i clear applicationId but i still have this error! i can't understand what is sample folder, library folder, or root folder in project! i have to import which one?!

I import sample project and root of this project with import new project but i have errors! newly i migrate to android studio from eclipse bcz many open source project that using android studio.I guess all of my question because i can't understand android studio structure properly!

Upvotes: 4

Views: 2045

Answers (2)

Kaishuo Xu
Kaishuo Xu

Reputation: 1

add the following dependencies:

dependencies {
    compile 'com.ikimuhendis:ldrawer:0.1'
    compile 'com.android.support:appcompat-v7:21.0.+'
}

change library's build.gradle and sample's build.gradle. it will be ok, you can try it.

Upvotes: 0

Nathua
Nathua

Reputation: 8826

use build.gradle to import the project easily. Make sure that you add it to the build.gradle under app(or your custom name) folder

in your build.gradle file, add the following dependencies, then sync gradle. that's all you need to do

dependencies {
    compile 'com.ikimuhendis:ldrawer:0.1'
    compile 'com.android.support:appcompat-v7:21.0.+'
}

Upvotes: 5

Related Questions