To-Import the library to Android Studio, there are the methods that can (or cannot) work. The first one worked for me, if I tried the second, it didn ' t work, but I leave it anyway, to give you a hint of WHA T-do if it doesn ' t work!
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 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
Li>go to File > Project Structure > Modules
- Locate your main Project module, click on it. It should has 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