Import the Project as library in Android Studio
Method 1:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Create a folder "subProject" in your project
- Copy and paste the FreemiumLibrary folder to your subProject folder
- On the root of your project directory create/modify the settings.gradle file. It should contain something like the following:
include 'MyApp', ':subProject:FreemiumLibrary'
- gradle clean & build/close the project and reopen/re-import it.
- Edit your project's build.gradle to add this in the "depencies" section:
dependencies {
//...
compile project(':subProject:FreemiumLibrary')
}
- Edit your App Activities to extend AdsFragmentActivity instead of Activity.
- Edit the library if you want to use it with ActionBarCompat
Method 2:
- Open your project in Android Studio
- Download the library (using Git, or a zip archive to unzip)
- Go to File > Import Module and import the library as a module
- Go to File > Project Structure > Modules
- Locate your main project module, click on it. It should have a few android libraries such as support-v4 etc.
- Click on the more on the left green "+" button > Module dependency
- Select "Freemium Library" (not Freemium Library Project)
- Modify your App Activities to extend AdsFragmentActivity instead of Activity.
- Modify the library if you want to use it with ActionBarCompat
Import the Project as library in Android Studio
Reviewed by Anonymous
on
January 15, 2016
Rating:
No comments: