Ionic Pro: (Free) - Package Native Binary


#1

I’m trying to package a native binary (Android) for my Ionic App using Ionic Pro (Free). However, I receive a “build failed” with this error “The Task.leftShift(Closure) method has been deprecated”.

Here follows the build log.

Any help is appreciated.
Thanks in advance.

Subproject Path: CordovaLib
Downloading file:/usr/src/app/platforms/android/gradle/wrapper/../../../../../../../opt/gradle-3.4.1-bin.zip
..........................................................................................................................................................................
Unzipping /home/gitlab-runner/.gradle/wrapper/dists/gradle-3.4.1-bin/91r30643knc9ry30p052a0zz/gradle-3.4.1-bin.zip to /home/gitlab-runner/.gradle/wrapper/dists/gradle-3.4.1-bin/91r30643knc9ry30p052a0zz
Set executable permissions for: /home/gitlab-runner/.gradle/wrapper/dists/gradle-3.4.1-bin/91r30643knc9ry30p052a0zz/gradle-3.4.1/bin/gradle
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
Download https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.2.3/builder-2.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.3/lint-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.2.3/gradle-api-2.2.3.pom
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.2.3/compilerCommon-2.2.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.4/asm-parent-5.0.4.pom
Download https://jcenter.bintray.com/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-parent/5.2.1/proguard-parent-5.2.1.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.build/0.7.5.201505241946/org.jacoco.build-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.pom
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.pom
Download https://jcenter.bintray.com/com/google/google/1/google-1.pom
Download https://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.pom
Download https://jcenter.bintray.com/org/antlr/antlr-master/3.5.2/antlr-master-3.5.2.pom
Download https://jcenter.bintray.com/org/sonatype/oss/oss-parent/9/oss-parent-9.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.2.3/builder-model-2.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.2.3/builder-test-api-2.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.2.3/sdklib-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.3/sdk-common-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.2.3/manifest-merger-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.3/ddmlib-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.11.0/jack-api-0.11.0.pom
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.3/protos-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.2.3/shared-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.2.3/tracker-25.2.3.pom
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.pom
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.3/lint-checks-25.2.3.pom
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.5.1/ecj-4.5.1.pom
Download https://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/17.0/guava-parent-17.0.pom
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.pom
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom
Download https://jcenter.bintray.com/org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://jcenter.bintray.com/org/apache/apache/9/apache-9.pom
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/24.5.0/annotations-24.5.0.pom
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.1/asm-parent-5.0.1.pom
Download https://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.pom
Download https://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.pom
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.2.3/layoutlib-api-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.2.3/dvlib-25.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/repository/25.2.3/repository-25.2.3.pom
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/33/commons-parent-33.pom
Download https://jcenter.bintray.com/org/apache/apache/13/apache-13.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1.1/httpcomponents-client-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/4.1.1/project-4.1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.1/httpcomponents-client-4.1.pom
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.pom
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.3/lint-api-25.2.3.pom
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.pom
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
Download https://jcenter.bintray.com/com/google/jimfs/jimfs-parent/1.1/jimfs-parent-1.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.1/httpcomponents-core-4.1.pom
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/5/commons-parent-5.pom
Download https://jcenter.bintray.com/org/apache/apache/4/apache-4.pom
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.pom
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.pom
Download https://jcenter.bintray.com/com/android/tools/annotations/25.2.3/annotations-25.2.3.pom
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.pom
Download https://jcenter.bintray.com/com/google/guava/guava-parent/18.0/guava-parent-18.0.pom
Download https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder/2.2.3/builder-2.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.3/lint-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download https://jcenter.bintray.com/com/android/tools/build/gradle-api/2.2.3/gradle-api-2.2.3.jar
Download https://jcenter.bintray.com/com/android/databinding/compilerCommon/2.2.3/compilerCommon-2.2.3.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-commons/5.0.4/asm-commons-5.0.4.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-gradle/5.2.1/proguard-gradle-5.2.1.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.core/0.7.5.201505241946/org.jacoco.core-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/org/jacoco/org.jacoco.report/0.7.5.201505241946/org.jacoco.report-0.7.5.201505241946.jar
Download https://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar
Download https://jcenter.bintray.com/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar
Download https://jcenter.bintray.com/org/antlr/antlr/3.5.2/antlr-3.5.2.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-model/2.2.3/builder-model-2.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/builder-test-api/2.2.3/builder-test-api-2.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/sdklib/25.2.3/sdklib-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.3/sdk-common-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/manifest-merger/25.2.3/manifest-merger-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.3/ddmlib-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.11.0/jack-api-0.11.0.jar
Download https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.10.0/jill-api-0.10.0.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.3/protos-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/shared/25.2.3/shared-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/25.2.3/tracker-25.2.3.jar
Download https://jcenter.bintray.com/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar
Download https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.3/lint-checks-25.2.3.jar
Download https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.5.1/ecj-4.5.1.jar
Download https://jcenter.bintray.com/com/android/databinding/baseLibrary/2.2.3/baseLibrary-2.2.3.jar
Download https://jcenter.bintray.com/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar
Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jar
Download https://jcenter.bintray.com/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
Download https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.jar
Download https://jcenter.bintray.com/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar
Download https://jcenter.bintray.com/org/antlr/ST4/4.0.8/ST4-4.0.8.jar
Download https://jcenter.bintray.com/com/android/tools/layoutlib/layoutlib-api/25.2.3/layoutlib-api-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/dvlib/25.2.3/dvlib-25.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/repository/25.2.3/repository-25.2.3.jar
Download https://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar
Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.1/httpmime-4.1.jar
Download https://jcenter.bintray.com/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
Download https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.3/lint-api-25.2.3.jar
Download https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.4/asm-analysis-5.0.4.jar
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download https://jcenter.bintray.com/com/google/jimfs/jimfs/1.1/jimfs-1.1.jar
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.1/httpcore-4.1.jar
Download https://jcenter.bintray.com/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
Download https://jcenter.bintray.com/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
Download https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar
Download https://jcenter.bintray.com/com/android/tools/annotations/25.2.3/annotations-25.2.3.jar
Download https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.jar
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_dczd6dp0q9phbzjp0lgrh3ndj.run(/usr/src/app/platforms/android/build.gradle:141)
File /home/gitlab-runner/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 26 in /opt/android-sdk/licenses
License for package Android SDK Platform 26 accepted.
Preparing "Install Android SDK Platform 26".
Warning: Failed to read or create install properties file.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Failed to install the following SDK components:
  [Android SDK Platform 26]
  The SDK directory (/opt/android-sdk) is not writeable,
  please update the directory permissions.

* 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: 28.743 secs
Error: /usr/src/app/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Failed to install the following SDK components:
  [Android SDK Platform 26]
  The SDK directory (/opt/android-sdk) is not writeable,
  please update the directory permissions.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Failed to upload apk to storage please retry your build.
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: exit status 1

#2

I always make the same suggestion at this point.

Create a brand new project with the vanilla package.json and config.xml. Try building that, then add one npm library at a time till you find the culprit.


#3

This is actually the error that is failing.

Can you post your local ionic info output please?


#4

Here follows my local information.
However, I am having issues running Package Native Binary at
https://dashboard.ionicjs.com

Thanks.

cli packages: (/home/jmoalves/.config/yarn/global/node_modules)

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 7.0.1 

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.1

System:

    Node : v6.11.3
    npm  : 3.10.10 
    OS   : Linux 4.10

Misc:

    backend : pro

#5

Yes, but I wnated to check the cordova-android version of your project.

I think you have to contact support: http://ionicframework.com/support#support We can’t look inside the service, so not much we can help you with.


#6

Simples yet good suggestion. :slight_smile:

I’ve created another project using the conference CLI starter. The Package Native Binary failed as well.

However, it failed with a different error message. If I understood correctly, it failed while uploading the APK.

I need to investigate further…

Thanks


#7

That is actually the correct way to circle in on the problem…

Post the error message you got there, but make sure to contact support. If it doesn’t work with the starters, normally it means something is broken on their side.


#8

I got the following error with the starter (conference) project.
I am not positive, but I seems it is related to some channel configuration (missing certificate or something like that).

BUILD SUCCESSFUL

Total time: 1 mins 36.618 secs
Built the following apk(s): 
	/usr/src/app/platforms/android/build/outputs/apk/android-armv7-debug.apk
	/usr/src/app/platforms/android/build/outputs/apk/android-x86-debug.apk
Crosswalk info:
        After much discussion and analysis of the market,
        we have decided to discontinue support for Android 4.0 (ICS) in Crosswalk starting with version 20,
        so the minSdkVersion of Cordova project is configured to 16 by default. 

Uploading apk...
Failed to upload apk to storage please retry your build.
Running after script...

#9

This is something for support.


#10

Ok, I will report the problem with the starter project as well.

BTW, I’ve upgraded my Pro account to Developer.
I’ve opened an issue with Product Support, related to my original problem.

I got this answer:
https://ionic.zendesk.com/hc/en-us/articles/115012901127

The issue is related to Cordova version.
I will downgrade it to 6.2.3 and try again.

Thank you all for the help.


#11

Using Cordova 6.2.3 fixed my problem.

BUILD SUCCESSFUL

Total time: 35.523 secs
Built the following apk(s):
/usr/src/app/platforms/android/build/outputs/apk/android-release.apk
Uploading apk…
Uploaded apk successfully.
Running after script…
$ clean-up
Cleaning up files…
Successful clean up
Job succeeded


#12

A post was split to a new topic: How do you build Package native binary in ionic pro (free)?