4月 122020
生成签名apk时,Android Studio报如下错误:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Could not determine the dependencies of task ':app:lintVitalAilifenRelease'. > Could not resolve all artifacts for configuration ':app:wanjiaDebugAndroidTestRuntimeClasspath'. > Could not resolve com.android.support:support-annotations:{strictly 26.1.0}. Required by: project :app > Cannot find a version of 'com.android.support:support-annotations' that satisfies the version constraints: Dependency path 'simplescales:app:unspecified' --> 'com.android.support.test:runner:1.0.2' --> 'com.android.support:support-annotations:27.1.1' Constraint path 'simplescales:app:unspecified' --> 'com.android.support:support-annotations:{strictly 26.1.0}' because of the following reason: wanjiaDebugRuntimeClasspath uses version 26.1.0 Dependency path 'simplescales:app:unspecified' --> 'com.android.support:appcompat-v7:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:recyclerview-v7:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support.test:runner:1.0.2' --> 'com.android.support.test:monitor:1.0.2' --> 'com.android.support:support-annotations:27.1.1' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:appcompat-v7:26.1.0' --> 'com.android.support:support-vector-drawable:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:support-v4:26.1.0' --> 'com.android.support:support-compat:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:support-v4:26.1.0' --> 'com.android.support:support-media-compat:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:support-v4:26.1.0' --> 'com.android.support:support-core-utils:26.1.0' --> 'com.android.support:support-annotations:26.1.0' Dependency path 'simplescales:app:unspecified' --> 'com.android.support:support-v4:26.1.0' --> 'com.android.support:support-core-ui:26.1.0' --> 'com.android.support:support-annotations:26.1.0' |
解决办法:
在app/build.gradle中加入以下依赖
1 |
implementation 'com.android.support:support-annotations:28.0.0' |
Sorry, the comment form is closed at this time.