Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2
Have tried this answer
but my problem still not solved. How can i solve it?
Then open Android Studio and go to File > Settings > Build, Execution and Deployment > Gradle > Use Gradle from > Set the path of the downloaded Gradle. Step 4. Now try syncing the Gradle again and check if the error still persists.
By default, Android Studio builds the debug version of your app, which is intended for use only during development, when you click Run. To change the build variant Android Studio uses, select Build > Select Build Variant in the menu bar.
In the Android menu, go to Build > Build Bundle(s) / APK (s) > Build APK(s). Android Studio will start building the APK for you. Once done, a pop-up on the bottom right will notify you of its completion.
Try to enable MultiDex to fix 65k methods error by adding this to your build.gradle
defaultConfig {
multiDexEnabled true
}
Also check for duplicated libraries usage (sometimes multiple libraries use same dependency like support-v4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With