Im using KustomApi to build an android app but getting error on generating app bundle

17 Views Asked by At

im using this https://bitbucket.org/frankmonza/kustomapi/src/master/ for my klwp app. the app runs on emulator perfectly and when im building app bundle im getting. it works for debug version and when i try the release option it gives me error. im not that expert in android studio.

i tried clean and rebuild, deleting build folders, gradle folders but doesnt work at all. i want to publish my app on playstore and playstore need .aab format file. if i submit debug version .aab file i think they will reject my app.

Type com.bumptech.glide.annotation.compiler.GlideIndexer_GlideModule_org_kustom_api_preset_glide_PresetFileModule is defined multiple times: C:\Users\Ashiq\AndroidStudioProjects\watchdogsklwp\preset\build.transforms\01da783d5eda9736327cab3f3876abdd\transformed\classes\classes.dex, C:\Users\Ashiq\AndroidStudioProjects\watchdogsklwp\app\build\intermediates\external_libs_dex\release\mergeExtDexRelease\classes.dex

this is my build.gradle:app

@file:Suppress("UnstableApiUsage")

plugins {
    id("com.android.application")
    kotlin("android")
}

dependencies {
    val libChannel: String by rootProject.extra
    implementation(project(":api"))
    implementation(project(":preset")) 
    implementation(project(":dashboard"))
    implementation("com.github.bumptech.glide:glide:4.16.0")
    annotationProcessor("com.github.bumptech.glide:compiler:4.16.0")
}

android {
    compileSdk = rootProject.ext.get("compileSdkVersion") as Int
    buildToolsVersion = rootProject.ext.get("buildToolsVersion") as String

    defaultConfig {

        /**
         * CHANGE THIS TO YOUR APP PKG NAME THIS CANNOT BE CHANGED AFTER FIRST RELEASE
         */
        applicationId = "com.alpha.watchdogs"

        /**
         * INCREMENT THIS IF YOU WANT TO RELEASE UPDATES
         */
        versionCode = 1
        versionName = "0.0.7"

        minSdk = 23
        targetSdk = rootProject.ext.get("targetSdkVersion") as Int
    }

    buildTypes {
        release {
            isShrinkResources = false
            isMinifyEnabled = false
            proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules")
        }
        aaptOptions.setNoCompress("zip", "komp", "klwp", "kwgt", "klck", "kwch", "kntf")
    }

    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
        kotlinOptions {
            jvmTarget = "1.8"
        }
    }

    namespace = "com.alpha.watchdogs"
}

i have tried to use

 implementation(project(":preset")) {
        exclude(group = "com.github.bumptech.glide", module = "glide")
    }
    implementation(project(":dashboard")) {
        exclude(group = "com.github.bumptech.glide", module = "glide")
    }

but doesnt work.

0

There are 0 best solutions below