-
Notifications
You must be signed in to change notification settings - Fork 89
Importing to Android Studio
mohamad-amin edited this page Aug 1, 2015
·
22 revisions
####Follow these steps to import the library to your project
- Download the project as a zip file and extract it on your computer.
- In Android Studio, Open File -> New -> New Module.
- In the newly opened window under the More Modules click Import Existing Project and set the Source Directory as the directory that you extracted the downloaded zip and click finish.
- Open your
build.gradle
file in theapp
module and add this line to yourdependencies
:
compile project(':persianmaterialdatetimepicker')
So you're build.gradle
file will look like this:
dependencies {
// Other dependenices
compile project(':persianmaterialdatetimepicker')
}
- Sync Gradle with your project and it's done! you can now use the library within your project.
####Note If you're getting this error after importing the library:
Error:(1, 0) Plugin with id 'com.android.library' not found.
then you should add these lines to the build.gradle
file of the persianmaterialdatetimepicker
module:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3' // or any other version you have
}
}