I'm pretty new to Android Studios and Gradle, so if this question is something obvious I'd like to apologize.
I get the following error with the given code:
Error: Program type already present: javax.inject.Inject
apply plugin: 'com.android.application'
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
compileSdkVersion 28
defaultConfig {
applicationId "com.example.xxx.cryptoapp"
minSdkVersion 15
targetSdkVersion 28
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(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'android.arch.lifecycle:extensions:1.1.1'
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'
compile 'com.lucadev:coinmarketcap-api:2.1'
}
I hope you can help me out. :)
Edit
I looked into the dependencies and saw that javax.inject
is used two times:
//short version of the list
+--- org.glassfish.hk2.external:javax.inject:2.5.0-b42@jar
+--- com.fasterxml.jackson.core:jackson-core:2.8.4@jar
\--- javax.inject:javax.inject:1@jar
However I can't quite understand how I exclude the correct module..
\--- javax.inject:javax.inject:1@jar` – bloodipwn Dec 30 '18 at 16:25