-
Notifications
You must be signed in to change notification settings - Fork 28
Import the library in Android Studio
Alex I. Ramirez edited this page Jul 24, 2017
·
4 revisions
To import the library to Android Studio, there are two methods that can work.
- 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
- 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
- Right-click your app in project view and select "Open Module Settings"
- Click the "Dependencies" tab and then the '+' button
- Select "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