1

my apk won't get excuted causing this problem . My project is a brand new one, but having problems running the app on my device ( Note :#: i did add to my depencecies multidex and it didn't work implementation 'com.android.support:multidex:2.0.1')

 defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
     //   applicationId "com.example.yumor"
     //   minSdkVersion 19
        // minSdkVersion flutter.minSdkVersion
     //   targetSdkVersion flutter.targetSdkVersion
     //   versionCode flutterVersionCode.toInteger()
     //   versionName flutterVersionName
        multiDexEnabled true
    }

                                                                                                       
}


dependencies {
    implementation platform('com.google.firebase:firebase-bom:29.1.0')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

}
~~~!


    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:mergeDexDebug'.
    > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
       > Failed to transform classes.jar (project :sqflite) to match attributes {artifactType=android-dex, com.android.build.api.attributes.BuildTypeAttr=debug, com.android.build.api.attributes.VariantAttr=debug, dexing-enable-desugaring=true, dexing-incremental-transform=false, dexing-is-debuggable=true, dexing-min-sdk=19, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
          > Execution failed for DexingWithClasspathTransform: C:\Users\Abdou\flutter project\realfultter\yumor\build\sqflite\intermediates\runtime_library_classes_jar\debug\classes.jar.
             > Unable to read jar file C:\Users\Abdou\flutter project\realfultter\yumor\build\sqflite\intermediates\runtime_library_classes_jar\debug\classes.jar
    
    

1 Answer 1

2

If this is set to 20 or lower, you need to configure your app for multiDex support.

 defaultConfig {
        applicationId "com.inspire.aaym"
        minSdkVersion 21
        targetSdkVersion 30
    }

So, if your app is not intended to be used in the Android version prior to 5.0, setting the minSdkVersion number to 21 will easily fix this issue.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.