Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNABLE TO RUN APPLICATION ON FLUTTER #118

Open
enakhe opened this issue Oct 14, 2024 · 1 comment
Open

UNABLE TO RUN APPLICATION ON FLUTTER #118

enakhe opened this issue Oct 14, 2024 · 1 comment

Comments

@enakhe
Copy link

enakhe commented Oct 14, 2024

I am trying to integrate the Smile ID Mobile SDK on my flutter app but I keep getting this error:

Error

ERROR:C:\Users\izuag.gradle\caches\transforms-3\ca5811f96825c792f28a4afe8695c908\transformed\lifecycle-livedata-core-2.8.6-runtime.jar: D8: java.lang.NullPointerException
ERROR:C:\Users\izuag.gradle\caches\transforms-3\9748e5d3b4cc8cc269762230d1d804cc\transformed\jetified-lottie-compose-6.5.2-runtime.jar: D8: com.android.tools.r8.internal.Hc: Sealed classes are not supported as program classes
ERROR:C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar: D8: java.lang.NullPointerException

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeExtDexDebug'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Failed to transform lottie-compose-6.5.2.aar (com.airbnb.android:lottie-compose:6.5.2) 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=24, 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 DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\9748e5d3b4cc8cc269762230d1d804cc\transformed\jetified-lottie-compose-6.5.2-runtime.jar.
> Error while dexing.
Failed to transform lifecycle-livedata-core-2.8.6.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.6) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\ca5811f96825c792f28a4afe8695c908\transformed\lifecycle-livedata-core-2.8.6-runtime.jar.
> Error while dexing.
Failed to transform lifecycle-livedata-core-2.8.6.aar (androidx.lifecycle:lifecycle-livedata-core:2.8.6) 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=24, 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 DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\ca5811f96825c792f28a4afe8695c908\transformed\lifecycle-livedata-core-2.8.6-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, 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 DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.
Failed to transform fragment-1.8.3.aar (androidx.fragment:fragment:1.8.3) 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=24, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingNoClasspathTransform: C:\Users\izuag.gradle\caches\transforms-3\f13d808f7a5eae48bba8c78bc5702b94\transformed\fragment-1.8.3-runtime.jar.
> Error while dexing.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 40s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────┐
│ [!] The shrinker may have failed to optimize the Java bytecode. │
│ To disable the shrinker, pass the --no-shrink flag to this command. │
│ To learn more, see: https://developer.android.com/studio/build/shrink-code
└────────────────────────────────────────────────────────────────────────────┘
Error: Gradle task assembleDebug failed with exit code 1

Here is my app/build.gradle file:

plugins {
id "com.android.application"
id 'com.google.gms.google-services'
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file("local.properties")
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader("UTF-8") { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
if (flutterVersionCode == null) {
flutterVersionCode = "1"
}

def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}

android {
namespace = "com.example.feteflex"
compileSdk = 34
ndkVersion = flutter.ndkVersion

compileOptions {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8
}

buildFeatures {
    compose true
}

composeOptions {
    kotlinCompilerExtensionVersion '1.5.3'
}

defaultConfig {
    applicationId = "com.example.feteflex"
    minSdk = 24
    targetSdk = 34
    versionCode = flutter.versionCode
    versionName = flutterVersionName
}

buildTypes {
    release {
        signingConfig = signingConfigs.debug
    }
}

}

flutter {
source = "../.."
}

dependencies {
implementation "androidx.compose.ui:ui:1.7.3"
implementation "androidx.compose.material:material:1.7.3"
implementation "androidx.compose.ui:ui-tooling-preview:1.7.3"
implementation "androidx.activity:activity-compose:1.9.2"
implementation "com.airbnb.android:lottie-compose:6.5.2"

// Firebase dependencies
implementation platform('com.google.firebase:firebase-bom:33.4.0')
implementation 'com.google.firebase:firebase-analytics'

// Kotlin standard library
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10"

}

@Enigma-I-am
Copy link

I am having a similar issue on ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants