Gradle warning on build.
From @jonatasfreitasv on May 9, 2017 18:50
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
Ionic version: (check one with "x") [ ] 1.x [ ] 2.x [X] 3.x
I'm submitting a ... (check one with "x") [X] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior: On build.
Steps to reproduce: ionic cordova run android --device --prod
Other information:
Ionic info:
global packages:
@ionic/cli-utils : 1.0.0-rc.2
Cordova CLI : 7.0.0
Ionic CLI : 3.0.0-rc.2
local packages:
@ionic/app-scripts : 1.3.7
@ionic/cli-plugin-cordova : 1.0.0-rc.2
@ionic/cli-plugin-ionic-angular : 1.0.0-rc.2
Ionic Framework : ionic-angular 3.1.1
System:
Node : v7.5.0
OS : macOS Sierra
Xcode : Xcode 8.2 Build version 8C38
ios-deploy : 1.9.1
ios-sim : 5.0.13
Copied from original issue: driftyco/ionic#11581
@jonatasfreitasv This seems to be an issue with your Cordova/Android environment. If you post the entire error, maybe I can help further.
@dwieeb still facing same
ANDROID_HOME=d:\Software\adt-bundle-windows-x86-20130917\sdk
JAVA_HOME=c:\Program Files\Java\jdk1.8.0_131
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use
Task.doLast(Action) instead.
at build_4mfq1tb3xhauwqpc0r8whi73n.run(D:\malkiat\Jack\test\loginApiTest\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please
use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard 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
:prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources
Error: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException:
:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':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: 2.48 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
I also face same issue
someone solved this, I also have the same issue
I'm missing ionic info from everyone, so I'm going to guess that if you get this error, you should first try doing:
cordova clean android
And retrying the build.
If that doesn't work, try updating Android Studio (which should install the latest Android SDK & Gradle version).
@dwieeb its resolved just removed the platform add and add platform again Might be issue with status bar plugin which is resolved
Still seeing this too. cordova clean android made no difference, nor did removing and re-adding the platform.
cli packages: (/Users/ruscarver/Documents/Code/transamerica-cx-ionic/node_modules)
@ionic/cli-plugin-proxy : 1.5.6
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.9.3
npm : 5.6.0
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b
Environment Variables:
ANDROID_HOME : /Users/ruscarver/Library/Android/sdk
HTTP_PROXY : http://....
http_proxy : not set
HTTPS_PROXY : http:....
https_proxy : not set
IONIC_HTTP_PROXY : not set
PROXY : not set
proxy : not set
Misc:
backend : pro
I have the latest Android Studio, which comes with gradle 4.1. I'm using jdk1.8.0_152
It turns out I had to change an attribute change in the <widget> tag of config.xml. It now has to be android-versionCode="1" instead of android-versionCode="1.0.0". However, adding the android platform via Cordova overwrites this.