Import the library to Android Studio

Source: Internet
Author: User

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:
    1. Open your project in Android Studio
    2. Download the library (using Git, or a zip archive to unzip)
    3. Create a folder "subproject" in your project
    4. Copy and paste the Freemiumlibrary folder to your subproject folder
    5. On the root of your project directory create/modify the Settings.gradle file. It should contain something like the following:
include ‘MyApp‘, ‘:subProject:FreemiumLibrary‘
    1. Gradle Clean & Build/close The project and reopen/re-import it.
    2. Edit your project ' s build.gradle to add the "depencies" section:
dependencies {//...    compile project(‘:subProject:FreemiumLibrary‘)}
    1. Edit your APP activities to extend adsfragmentactivity instead of Activity.
    2. Edit the library if you want to use it with Actionbarcompat

Method 2:
      1. Open your project in Android Studio
      2. Download the library ( Using Git, or a zip archive to unzip)
      3. Go to File > Import module and import the library as a module
      4. Li>go to File > Project Structure > Modules
      5. Locate your main Project module, click on it. It should has a few Android libraries such as support-v4 etc.
      6. Click on the more on the left green "+" button > Module dependency
      7. Select "Freemium Library" (not Freemium library Project)
      8. Modify your APP activities to extend adsfragmentactivity instead of Activity.
      9. Modify The library if you want to use it with Actionbarcompat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.