• 一些第三方开源框架怎么快速放到项目中去


    第一种方法:直接在Android studio的当前项目上按F12快捷键,之后切到Denpendencies下,直接选择要导入的开源框架进行在线搜索即可。。

    第二种方法:可以指定的导入所需要的开源框架的版本:

        例如:

     添加Retrofit库到项目中

    Gradle :

    compile 'com.squareup.retrofit:retrofit:1.9.0'

    记住这是在项目内部的Gradle,别弄错了

    例如

    apply plugin: 'com.android.application'

    android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

    defaultConfig {
    applicationId "com.fightzhao.retrofitdemo"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    }
    buildTypes {
    release {
    minifyEnabled false
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    }
    }

    dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    }
  • 相关阅读:
    CSS属性选择器
    CSS基本选择器
    CSS的引入方式
    CSS
    228.4.flask试图
    227.3.flask路由
    225.1.flask初体验
    226.2.flask配置文件
    229.5.flask请求和相应
    230.6.flask模板
  • 原文地址:https://www.cnblogs.com/fightzhao/p/4877389.html
Copyright © 2020-2023  润新知