zoukankan      html  css  js  c++  java
  • import the library to Android Studio

    To import the library to Android Studio, there is two methods that can (or cannot) work. The first one worked for me, but when I tried the second, it didn't work, but I leave it anyway, to give you a hint of what to 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 this in 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. Go to File > Project Structure > Modules
      5. Locate your main project module, click on it. It should have 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
  • 相关阅读:
    快速幂&欧拉降幂
    欧拉函数
    素数打表-筛法
    多源最短路径问题(Floyd算法)
    蓝桥杯-本质上升序列
    蓝桥杯-玩具蛇
    SDUT-计算机组成原理
    取消U盘和移动硬盘的GPT保护分区
    Windows 10 上运行 photoshop 等软件出现 loadlibrary failed with error 87 的解决方法!
    做题笔记
  • 原文地址:https://www.cnblogs.com/sfce/p/3866483.html
Copyright © 2011-2022 走看看