Я получаю следующую ошибку, когда пытаюсь «Сгенерировать подписанный пакет / Apk» в android studio: Program type already present: com.hlab.fabrevealmenu.model.FABMenuItem
Приложение отлично работает, когда я запускаю его со android studio на своем смартфоне или на эмулятор.
это мой Build.gradle (Module app)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'androidx.navigation.safeargs'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.mtp.laboproject"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField "String", "BASE_URL", "\"http://picking-geant.ddns.net:84/\""
}
}
dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
def cor_version = "1.3.2"
def lifecycle_version = "2.2.0-rc02"
def retrofit_version = "2.6.0"
def work_version = "2.2.0"
def anko_version = '0.10.8'
def dispatcher_version = '4.6.0'
def rxJavaVersion = '2.0.1'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.google.firebase:firebase-core:17.2.1'
implementation 'com.google.firebase:firebase-auth:19.2.0'
// Kotlin + coroutines + RX
implementation "androidx.work:work-runtime-ktx:$work_version"
implementation "io.reactivex.rxjava2:rxandroid:$rxJavaVersion"
implementation "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
implementation 'com.android.support:multidex:1.0.3'
//bind view
implementation 'com.jakewharton:butterknife:8.8.1'
// implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation "org.jetbrains.anko:anko:$anko_version"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0"
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
//Kodein Dependency Injection
implementation "org.kodein.di:kodein-di-generic-jvm:6.3.2"
implementation "org.kodein.di:kodein-di-framework-android-x:6.3.2"
implementation "androidx.appcompat:appcompat:1.0.2"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.retrofit2:converter-moshi:$retrofit_version"
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2"
implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0"
// Json to/from Object
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.8.+'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
// set biometric bio
implementation 'androidx.biometric:biometric:1.0.0'
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$cor_version"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$cor_version"
// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.android.support:design:29.0.0'
implementation 'com.google.android.material:material:1.1.0-beta02'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
//dagger support
implementation 'com.google.dagger:dagger:2.13'
kapt 'com.google.dagger:dagger-compiler:2.13'
implementation "com.google.dagger:dagger-android-support:2.11"
implementation "com.google.dagger:dagger:2.11"
kapt "android.arch.persistence.room:compiler:1.1.1"
kapt "com.google.dagger:dagger-compiler:2.11"
implementation "org.permissionsdispatcher:permissionsdispatcher:$dispatcher_version"
kapt "org.permissionsdispatcher:permissionsdispatcher-processor:$dispatcher_version"
implementation 'com.scottyab:secure-preferences-lib:0.1.7'
implementation 'de.hdodenhof:circleimageview:3.0.1'
//ExiInterface from androidx
implementation "androidx.exifinterface:exifinterface:1.1.0"
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.1.0'
implementation 'org.eclipse.paho:org.eclipse.paho.android.service:1.1.1'
implementation project(':fabrevealmenu')
}
apply plugin: 'com.google.gms.google-services'
А это мой Build.gradle (Module fabrevealmenu)
apply plugin: 'com.android.library'
android {
//noinspection GradleCompatible
compileSdkVersion 27
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 4
versionName "1.0.4"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// implementation fileTree(include: ['*.jar'], dir: 'libs')
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support:recyclerview-v7:27.1.1'
api 'com.android.support:cardview-v7:27.1.1'
api 'com.android.support:design:27.1.0'
//External libs
implementation 'com.github.asyl.animation:arcanimator:1.0.0'
}
ext {
PUBLISH_GROUP_ID = 'com.hlab.fabrevealmenu'
PUBLISH_ARTIFACT_ID = 'fab-reveal-menu'
PUBLISH_VERSION = '1.0.4'
}
Я должен также отметить, что я пробовал некоторые из предложенные решения в других темах, но они не работали.