alamin-karno / flutter-crisp-chat

A flutter plugin package for using crisp chat natively on Android & iOS.
MIT License
9 stars 5 forks source link

Execution failed for task ':app:mergeExtDexDebug'. #16

Open FantaMagier opened 1 month ago

FantaMagier commented 1 month ago

Describe the bug The new Version for Crisp Chat get me this error:

* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform appcompat-resources-1.7.0.aar (androidx.appcompat:appcompat-resources:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/USER/.gradle/caches/transforms-3/923bc8a3d46994e1c2c98c620a4d7ea5/transformed/jetified-appcompat-resources-1.7.0-runtime.jar.
         > Error while dexing.
   > Failed to transform appcompat-1.7.0.aar (androidx.appcompat:appcompat:1.7.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingWithClasspathTransform: /Users/USER/.gradle/caches/transforms-3/bb3b45c568ba24cd1f17b84754006185/transformed/appcompat-1.7.0-runtime.jar.
         > Error while dexing.

crisp_chat: ^2.0.6

alamin-karno commented 1 month ago

Just simply update your settings.gradle files:

plugins {
    id "dev.flutter.flutter-plugin-loader" version "1.0.0"
    id "com.android.application" version "8.1.1" apply false   // Make sure this one is updated
    id "org.jetbrains.kotlin.android" version "1.6.10" apply false
}

And gradle-wrapper.properties file:

distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip // Update this to 8.x
FantaMagier commented 1 month ago

@alamin-karno After that I get the following error: * What went wrong: A problem occurred evaluating root project 'android'.

A problem occurred configuring project ':app'. Could not create an instance of type com.android.build.api.variant.impl.ApplicationVariantImpl. Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

    If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

BUILD FAILED in 7s

alamin-karno commented 1 month ago

You have to added namespace on build.gradle in app lavel.

android {
    namespace "com.example.myapp" // Here your app package name
    ...
}

You can check this project for clear concept on how to setup on Android: flutter-crisp-chat/example