Error:Execution failed for task ':shrinkDebugMultiDexComponents' - android

I get the following error:
Information:Gradle tasks [:assembleDebug]
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:preReleaseBuild
:prepareComAndroidSupportMultidex100Library UP-TO-DATE
:prepareComAndroidSupportSupportV42102Library UP-TO-DATE
:prepareComAstuetzPagerslidingtabstrip101Library UP-TO-DATE
:prepareMeDm7BarcodescannerCore15Library UP-TO-DATE
:prepareMeDm7BarcodescannerZbar15Library UP-TO-DATE
:prepareDebugDependencies
:processDebugManifest UP-TO-DATE
:collectDebugMultiDexComponents UP-TO-DATE
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava
:packageAllDebugClassesForMultiDex
:shrinkDebugMultiDexComponents FAILED
Error:Execution failed for task ':shrinkDebugMultiDexComponents'.
> 2
The problem exists in any higher version of gradle than: "com.android.tools.build:gradle:0.14.1"
I'm not sure what is going on out there. Has anyone encountered a problem like this?

Related

App debug issue

When i debug my app it will show an error like
BUILD FAILED
Total time: 1 mins 41.485 secs
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
Parallel execution with configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2421Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:app:prepareComFacebookAndroidFacebookAndroidSdk450Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAdsLite940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuthBase940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCastFramework940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesClearcut940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesContextmanager940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGass940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIid940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlaces940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTagmanager940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTagmanagerApi940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet940Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalytics940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAnalyticsImpl940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuth940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthCommon940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseAuthModule940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCommon940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseConfig940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCore940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseCrash940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseDatabase940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseDatabaseConnection940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseIid940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseMessaging940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseStorage940Library UP-TO-DATE
:app:prepareComGoogleFirebaseFirebaseStorageCommon940Library UP-TO-DATE
:app:prepareComGoogleMapsAndroidAndroidMapsUtils044Library UP-TO-DATE
:app:prepareComToptocheSearchablespinnerSearchablespinnerlibrary131Library UP-TO-DATE
:app:prepareOrgSolovyevAndroidViewsLinearLayoutManager05Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:processDebugGoogleServices
Parsing json file: D:\OnGoiningProjrct\drzone\app\google-services.json
:app:generateDebugResources
:app:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 10.975 secs
Add your google-services.json file inside /app folder and try again. This file is necessary when using the Google Play Services SDK.

Cordova android build duration time takes too much time

Since I've been using phonegap-plugin-barcodescanner for my Cordova app, android build time increased from 30 second to 9 min.
Here is the build processing of my app:
C:\xampp\htdocs\www\camera>cordova build android
ANDROID_HOME=C:\Users\Emad Emami\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_77
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareBarcodescannerLibrary UP-TO-DATE
:prepareComAndroidSupportSupportV42400Alpha2Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:generateDebugResValues UP-TO-DATE
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:compileDebugNdk UP-TO-DATE
:compileDebugSources
:transformClassesWithDexForDebug
:mergeDebugJniLibFolders
:transformNative_libsWithMergeJniLibsForDebug
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
:validateDebugSigning
:packageDebug
:zipalignDebug
:assembleDebug
:cdvBuildDebug
BUILD SUCCESSFUL
Total time: 9 mins 17.768 secs
Built the following apk(s):
C:/xampp/htdocs/www/camera/platforms/android/build/outputs/apk/android-debu
g.apk
Most delay time is on this part:
C:\xampp\htdocs\www\camera>cordova build android
ANDROID_HOME=C:\Users\Emad Emami\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_77
Can any one tell me where am I wrong?

ionic run android not work

C:\Users\mortadha\android-apps\todo2>ionic run --debug android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\mortadha\android-ap
ps\todo2\hooks\after_prepare\010_add_platform_class.js C:\Users\mortadha\android
-apps\todo2
add to body class: platform-android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\mortadha\android-ap
ps\todo2\hooks\after_prepare\020_remove_sass_from_platforms.js C:\Users\mortadha
\android-apps\todo2
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_79
No target specified, deploying to device '4d00e9048f4f4043'.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.E
xecException: Process 'command 'C:\Program Files (x86)\Android\android-sdk\build
-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 13.391 secs
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\mortadha\android
-apps\todo2\platforms\android\gradlew cdvBuildDebug -b C:\Users\mortadha\android
-apps\todo2\platforms\android\build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemo
n=true -Pandroid.useDeprecatedNdk=true"

Can't generate apk: zipalign.exe finished with non-zero exit value 1

I try to generate apk for an app.
Here is the error i got:
Information:Gradle tasks [:MyApp:assembleRelease]
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19-1' (Expected 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19')
:MyApp:preBuild UP-TO-DATE
:MyApp:preReleaseBuild UP-TO-DATE
:MyApp:checkReleaseManifest
:MyApp:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseBuild UP-TO-DATE
:MyAppEssentialsLib:compileReleaseNdk UP-TO-DATE
:MyAppEssentialsLib:compileLint
:MyAppEssentialsLib:copyReleaseLint UP-TO-DATE
:MyAppEssentialsLib:checkReleaseManifest
:MyAppEssentialsLib:preDebugAndroidTestBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyAppEssentialsLib:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyAppEssentialsLib:prepareReleaseDependencies
:MyAppEssentialsLib:compileReleaseAidl UP-TO-DATE
:MyAppEssentialsLib:compileReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:generateReleaseBuildConfig UP-TO-DATE
:MyAppEssentialsLib:generateReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResValues UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResources UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseManifest UP-TO-DATE
:MyAppEssentialsLib:processReleaseResources UP-TO-DATE
:MyAppEssentialsLib:generateReleaseSources UP-TO-DATE
:MyAppEssentialsLib:compileReleaseJavaWithJavac UP-TO-DATE
:MyAppEssentialsLib:extractReleaseAnnotations UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseProguardFiles UP-TO-DATE
:MyAppEssentialsLib:packageReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:packageReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseJavaRes UP-TO-DATE
:MyAppEssentialsLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyAppEssentialsLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseJniLibFolders UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:bundleRelease UP-TO-DATE
:MyApp:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyApp:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyApp:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyApp:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyApp:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyApp:prepareReleaseDependencies
:MyApp:compileReleaseAidl UP-TO-DATE
:MyApp:compileReleaseRenderscript UP-TO-DATE
:MyApp:generateReleaseBuildConfig UP-TO-DATE
:MyApp:generateReleaseAssets UP-TO-DATE
:MyApp:mergeReleaseAssets UP-TO-DATE
:MyApp:generateReleaseResValues UP-TO-DATE
:MyApp:processReleaseGoogleServices
:MyApp:generateReleaseResources
:MyApp:mergeReleaseResources UP-TO-DATE
:MyApp:processReleaseManifest UP-TO-DATE
:MyApp:processReleaseResources UP-TO-DATE
:MyApp:generateReleaseSources UP-TO-DATE
:MyApp:compileReleaseJavaWithJavac UP-TO-DATE
:MyApp:compileReleaseNdk UP-TO-DATE
:MyApp:compileReleaseSources UP-TO-DATE
:MyApp:lintVitalRelease
:MyApp:prePackageMarkerForRelease
:MyApp:transformClassesWithDexForRelease UP-TO-DATE
:MyApp:mergeReleaseJniLibFolders UP-TO-DATE
:MyApp:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyApp:processReleaseJavaRes UP-TO-DATE
:MyApp:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyApp:validateExternalOverrideSigning
:MyApp:packageRelease UP-TO-DATE
:MyApp:zipalignRelease
Unable to open 'C:\Users\MyApp-release.apk' as zip archive
Error:Execution failed for task ':MyApp:zipalignRelease'.
> Process 'command 'C:\Users\MyUser\AppData\Local\Android\sdk\build-tools\23.0.2\zipalign.exe'' finished with non-zero exit value 1
I dont't get it whats the cause?
You should clean the project and restart Android Studio and regenerate the APK and this time change your APKpath to desktop when generating .
it will most probably solve your issue.
The destination path C:\Users\MyApp-release.apk seems wrong.
It should be something like C:\Users\MyUser\MyApp-release.apk.

Finished with non-zero exit value 2 [duplicate]

This question already has answers here:
DexIndexOverflowException issue after updating to latest appcompat and support library
(7 answers)
Weird : UNEXPECTED TOP-LEVEL EXCEPTION: Execution failed for task app:dexDebug
(4 answers)
Closed 7 years ago.
I had this problem for some hours, i did not risolve. please help me.
I have already did Clean / Build / Rebuild / Cache Invalidate /
Gradle sync etc.
Finally i get this error when i have onClick Listner in Alert Dialog.
I am calling a button to show up a dialog from a fragment where i pass Context as "getActivity" .. But it works with Toast so
it is not a problem(Toast works and Dialog also works with ok button
with no listeners.)
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2220Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidAnswers132Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidBeta113Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlytics252Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore235Library UP-TO-DATE
:app:prepareComGithubLzyzsdCircleprogress110Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet750Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable750Library UP-TO-DATE
:app:prepareComJourneyappsZxingAndroidEmbedded303Library UP-TO-DATE
:app:prepareComOguzdevCircularFloatingActionMenu102Library UP-TO-DATE
:app:prepareComReginaldSwiperefreshLibrary111Library UP-TO-DATE
:app:prepareIoFabricSdkAndroidFabric136Library UP-TO-DATE
:app:prepareRuNotiesScrollable113Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:fabricGenerateResourcesDebug
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugResources
:app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with
non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 13.67 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
It was the Error
Here is my Dialog and XML Button
XML for Button
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Rimuovi chiamata abbinata"
android:id="#+id/btn_del_chiamata"
android:layout_above="#+id/riep_tec_rl_nav"
android:layout_centerHorizontal="true"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:drawableRight="#drawable/delete"
android:background="#xml/edit_text" />
You run into the 65K method count limit. Either you use multidex or reduce the number of methods ( e.g. with proguard ) Please read this: https://developer.android.com/tools/building/multidex.html

Categories

Resources