我在android studio中有以下错误。
程序类型已经存在:com.eclipsesource.v8.NodeJS $ 2
如何从加载类中排除此类?以及该类如何被加载两次?这是我目前的成绩(这种方式无法正常工作)。
应用插件:“ com.android.application”
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
//incremental = true;
//preDexLibraries = false
javaMaxHeapSize "4g" // 2g should be also OK
}
defaultConfig {
multiDexEnabled true
applicationId "rs.etf.igor.algorithmsimulation"
minSdkVersion 24
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
packagingOptions {
exclude 'license/LICENSE.dom-documentation.txt'
exclude 'license/NOTICE'
exclude 'license/README.dom.txt'
exclude 'license/LICENSE.dom-software.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'license/LICENSE'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
}
}
依赖性{
configurations {
all*.exclude group: 'com.eclipsesource.v8', module: 'NodeJS$2'
}
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'guru.nidi:graphviz-java:0.2.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/log4j-1.2.17.jar')
}
国王的问候, 伊戈尔·沃德利亚(Igor Vurdelja)