apply plugin: 'com.android.library' android { compileSdkVersion 27 defaultConfig { minSdkVersion 16 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.0.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' api 'com.lzy.net:okgo:3.0.4' //以下三个选择添加,okrx和okrx2不能同时使用 api 'com.lzy.net:okrx2:2.0.2' api 'com.lzy.net:okserver:2.0.5' api 'com.google.code.gson:gson:2.8.2' api files('libs/fastjson-1.2.2.jar') }