“程序类型已存在”是什么意思?
我正在尝试在Android Studio中构建应用。将Eclipse Paho库添加为gradle依赖项(或者是Maven?我是Android生态系统的新手)后,我收到以下错误:
Program type already present: android.support.v4.accessibilityservice.AccessibilityServiceInfoCompatMessage{kind=ERROR, text=Program type already present: android.support.v4.accessibilityservice.AccessibilityServiceInfoCompat, sources=[Unknown source file], tool name=Optional.of(D8)}我已经检查了许多与此错误相关的不同StackOverflow问题,但答案都是特定于某些库的。 我不仅要寻找错误的解决方案,还要了解错误的含义。 这样,人们就可以更容易地找出针对特定案例的解决方案。到目前为止,还没有答案提供。
从其他StackOverflow答案中,我发现它与我的gradle文件有关。所以,这是app / build.gradle:
apply plugin: 'com.android.application'android {
compileSdkVersion 27
defaultConfig {
applicationId "---REDACTED FOR PRIVACY---"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:support-media-compat:27.1.0'
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.google.android.gms:play-services-maps:12.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.0.2'}repositories {
maven { url 'https://repo.eclipse.org/content/repositories/paho-releases/' }}皈依舞
ibeautiful
相关分类