plugins { id 'com.android.application' } android { packagingOptions { resources.excludes.add("META-INF/DEPENDENCIES"); resources.excludes.add("META-INF/NOTICE"); resources.excludes.add("META-INF/LICENSE"); resources.excludes.add("META-INF/LICENSE.txt"); resources.excludes.add("META-INF/NOTICE.txt"); } namespace 'net.micode.notes' compileSdk 33 // compileSdkVersion 33 defaultConfig { applicationId "net.micode.notes" minSdk 26 targetSdk 33 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation 'androidx.appcompat:appcompat:1.4.1' implementation 'com.google.android.material:material:1.9.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.3' //implementation fileTree(dir: 'F:\\Java\\JavaCode\\miNOte\\httpcomponents-client-4.5.14-bin\\lib', include: ['*.aar', '*.jar'], exclude: []) // implementation(fileTree(mapOf( // "dir" to "D:\\Code\\AndroidCode\\Notesmaster\\httpcomponents-client-4.5.14-bin\\lib", // "include" to listOf("*.aar", "*.jar"), // "exclude" to listOf("") // ))) //修改为如下代码: implementation(files("F:\\Java\\JavaCode\\miNOte\\httpcomponents-client-4.5.14-bin\\lib\\httpclient-osgi-4.5.14.jar")) implementation(files("F:\\Java\\JavaCode\\miNOte\\httpcomponents-client-4.5.14-bin\\lib\\httpclient-win-4.5.14.jar")) implementation(files("F:\\Java\\JavaCode\\miNOte\\httpcomponents-client-4.5.14-bin\\lib\\httpcore-4.4.16.jar")) testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' }