从android studio生成签名apk时出错。
找不到满足"junit:junit"版本的版本constraints:依赖项路径'helloworld:app:unspecified'->'com.googlecode.json-simple:json-ssimple:1.1.1'->'junit:junit:4.10'由于以下原因,约束路径"helloworld:app:unspecified"-->"junit:junit:{strict 4.10}":debugRuntimeClasspath使用版本4.10依赖项路径'helloworld:app:unspecified'->'com.android.support.test.sespresso:sespresso core:2.2.2'->'com.android.support.test:runner:0.5'->'junit:junit:4.12'
这是我的批量渐变文件
> apply plugin: 'com.android.application'
>
> ext.android_support_version = '26.1.0' ext.arch_version = '1.0.0'
> ext.retrofit_version = '2.3.0'
>
> android {
> compileSdkVersion 26
> defaultConfig {
> applicationId "com.example.helloworlddeveloper"
> minSdkVersion 16
> targetSdkVersion 26
> versionCode 5
> versionName "2.0"
> testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
> vectorDrawables.useSupportLibrary = true
> multiDexEnabled true
> }
> buildTypes {
> release {
> minifyEnabled false
> proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
> }
> }
>
> }
>
> dependencies {
> implementation fileTree(dir: 'libs', include: ['*.jar'])
> androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',
> {
> exclude group: 'com.android.support', module: 'support-annotations'
> })
> implementation "com.android.support:appcompat-v7:$android_support_version"
> implementation('com.mikepenz:materialdrawer:5.9.2@aar') {
> transitive = true
> }
> implementation('com.googlecode.json-simple:json-simple:1.1.1') {
> exclude group: 'org.hamcrest', module: 'hamcrest-core'
> }
> implementation "com.android.support:appcompat-v7:$android_support_version"
> implementation "com.android.support:design:$android_support_version"
> implementation "com.android.support:recyclerview-v7:$android_support_version"
> implementation "com.android.support:cardview-v7:$android_support_version"
> implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
> implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
> implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
> implementation 'com.github.bumptech.glide:glide:3.8.0'
> implementation "com.android.support:support-v4:$android_support_version"
> implementation "com.android.support:support-vector-drawable:$android_support_version"
> testImplementation 'junit:junit:4.12'
> implementation 'com.android.support:multidex:1.0.3'
> implementation 'com.google.android.gms:play-services-ads:17.1.2'
> implementation 'com.google.firebase:firebase-messaging:17.3.4'
> implementation 'com.github.judemanutd:autostarter:1.0.3'
>
> } apply plugin: 'com.google.gms.google-services'
尝试添加implementation 'com.android.support:support-annotations:26.0.0'
并删除此exclude group: 'com.android.support', module: 'support-annotations'