7 Replies Latest reply on Sep 20, 2016 5:41 AM by ostaral28768068

    Android compile error: phonegap-plugin-csdk-image-editor

    ostaral28768068 Level 1

      Hello,

       

      I am trying to use the npm plugin: phonegap-plugin-csdk-image-editor in my android app. When I add this plug-in to my project I get the following problem:

       

      :transformClassesWithMultidexlistForRelease FAILED

       

      Could you tell me what the issue is? Full build log is shown below:

       

      Build Date: 2016-09-19 12:34:35 +0000

      Configuration on demand is an incubating feature.

      Incremental java compilation is an incubating feature.

      :preBuild UP-TO-DATE

      :preReleaseBuild UP-TO-DATE

      :checkReleaseManifest

      :preDebugBuild UP-TO-DATE

      :CordovaLib:preBuild UP-TO-DATE

      :CordovaLib:preDebugBuild UP-TO-DATE

      :CordovaLib:compileDebugNdk UP-TO-DATE

      :CordovaLib:compileLint

      :CordovaLib:copyDebugLint UP-TO-DATE

      :CordovaLib:mergeDebugProguardFiles

      :CordovaLib:packageDebugRenderscript UP-TO-DATE

      :CordovaLib:checkDebugManifest

      :CordovaLib:prepareDebugDependencies

      :CordovaLib:compileDebugRenderscript

      :CordovaLib:generateDebugResValues

      :CordovaLib:generateDebugResources

      :CordovaLib:packageDebugResources

      :CordovaLib:compileDebugAidl

      :CordovaLib:generateDebugBuildConfig

      :CordovaLib:mergeDebugShaders

      :CordovaLib:compileDebugShaders

      :CordovaLib:generateDebugAssets

      :CordovaLib:mergeDebugAssets

      :CordovaLib:processDebugManifest

      :CordovaLib:processDebugResources

      :CordovaLib:generateDebugSources

      :CordovaLib:incrementalDebugJavaCompilationSafeguard

      :CordovaLib:compileDebugJavaWithJavac

      :CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processDebugJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForDebug

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

      :CordovaLib:mergeDebugJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForDebug

      :CordovaLib:transformNative_libsWithSyncJniLibsForDebug

      :CordovaLib:bundleDebug

      :CordovaLib:preReleaseBuild UP-TO-DATE

      :CordovaLib:compileReleaseNdk UP-TO-DATE

      :CordovaLib:copyReleaseLint UP-TO-DATE

      :CordovaLib:mergeReleaseProguardFiles

      :CordovaLib:packageReleaseRenderscript UP-TO-DATE

      :CordovaLib:checkReleaseManifest

      :CordovaLib:prepareReleaseDependencies

      :CordovaLib:compileReleaseRenderscript

      :CordovaLib:generateReleaseResValues

      :CordovaLib:generateReleaseResources

      :CordovaLib:packageReleaseResources

      :CordovaLib:compileReleaseAidl

      :CordovaLib:generateReleaseBuildConfig

      :CordovaLib:mergeReleaseShaders

      :CordovaLib:compileReleaseShaders

      :CordovaLib:generateReleaseAssets

      :CordovaLib:mergeReleaseAssets

      :CordovaLib:processReleaseManifest

      :CordovaLib:processReleaseResources

      :CordovaLib:generateReleaseSources

      :CordovaLib:incrementalReleaseJavaCompilationSafeguard

      :CordovaLib:compileReleaseJavaWithJavac

      :CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      :CordovaLib:processReleaseJavaRes UP-TO-DATE

      :CordovaLib:transformResourcesWithMergeJavaResForRelease

      :CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

      :CordovaLib:mergeReleaseJniLibFolders

      :CordovaLib:transformNative_libsWithMergeJniLibsForRelease

      :CordovaLib:transformNative_libsWithSyncJniLibsForRelease

      :CordovaLib:bundleRelease

      :prepareBarcodescannerLibrary

      :prepareComAdobeCreativesdkAndroidSharedAndroidShared006Library

      :prepareComAdobeCreativesdkAndroidSharedCommonCommonUi115Library

      :prepareComAdobeCreativesdkFoundationAuth091062Library

      :prepareComAdobeCreativesdkImage463Library

      :prepareComAdobeCreativesdkImageNative11335Library

      :prepareComAndroidSupportAnimatedVectorDrawable2340Library

      :prepareComAndroidSupportAppcompatV72340Library

      :prepareComAndroidSupportCardviewV72340Library

      :prepareComAndroidSupportDesign2340Library

      :prepareComAndroidSupportMultidex101Library

      :prepareComAndroidSupportPaletteV72340Library

      :prepareComAndroidSupportRecyclerviewV72340Library

      :prepareComAndroidSupportSupportV42411Library

      :prepareComAndroidSupportSupportVectorDrawable2340Library

      :prepareComGetbaseFloatingactionbutton1100Library

      :prepareComGithubFengdaiAlertdialogproCore026Library

      :prepareComGithubFengdaiAlertdialogproThemeMaterial026Library

      :prepareComGoogleAndroidGmsPlayServicesBase840Library

      :prepareComGoogleAndroidGmsPlayServicesBasement840Library

      :prepareComInfstoryProguardAnnotations102Library

      :prepareComJakewhartonRxbindingRxbinding040Library

      :prepareComJakewhartonRxbindingRxbindingAppcompatV7040Library

      :prepareComJakewhartonRxbindingRxbindingSupportV4040Library

      :prepareComLocalyticsAndroidLibrary380Library

      :prepareComSothreeSlidinguppanelLibrary300Library

      :prepareComTimehopStickyheadersrecyclerviewLibrary043Library

      :prepareComTrelloRxlifecycle061Library

      :prepareComTrelloRxlifecycleComponents061Library

      :prepareDeHdodenhofCircleimageview200Library

      :prepareIoReactivexRxandroid120Library

      :prepareItSephirothAndroidExifAndroidExifExtended106Library

      :prepareItSephirothAndroidLibraryAbAbTest205Library

      :prepareItSephirothAndroidLibraryDisklrumulticacheDisklrumulticache108Library

      :prepareItSephirothAndroidLibraryImagezoomImagezoom225Library

      :prepareItSephirothAndroidLibraryPicassoPicasso2524bLibrary

      :prepareItSephirothAndroidLibraryTargettooltipTargetTooltipLibrary1314Library

      :prepareItSephirothAndroidLibraryViewrevealanimatorViewRevealAnimator114Library

      :prepareItSephirothRxbroadcast002Library

      :prepareProjectCordovaLibUnspecifiedReleaseLibrary

      :prepareReleaseDependencies

      :compileReleaseAidl

      :compileReleaseRenderscript

      :generateReleaseBuildConfig

      :mergeReleaseShaders

      :compileReleaseShaders

      :generateReleaseAssets

      :mergeReleaseAssets

      :generateReleaseResValues

      :generateReleaseResources

      :mergeReleaseResources

      :processReleaseManifest

      :processReleaseResources

      :generateReleaseSources

      :incrementalReleaseJavaCompilationSafeguard

      :compileReleaseJavaWithJavac

      :compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

      Note: 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.

      :compileReleaseNdk UP-TO-DATE

      :compileReleaseSources

      :prePackageMarkerForRelease

      :transformClassesWithJarMergingForRelease

      :collectReleaseMultiDexComponents

      :transformClassesWithMultidexlistForRelease

      ProGuard, version 5.2.1

      Reading program jar [/project/build/intermediates/transforms/jarMerging/release/jars/1/1f/combined.jar]

      Reading library jar [/android-sdk/build-tools/24.0.1/lib/shrinkedAndroid.jar]

      Preparing output jar [/project/build/intermediates/multi-dex/release/componentClasses.jar]

        Copying resources from program jar [/project/build/intermediates/transforms/jarMerging/release/jars/1/1f/combined.jar]

      :transformClassesWithMultidexlistForRelease FAILED

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':transformClassesWithMultidexlistForRelease'.

      > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/bin/java'' 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: 28.992 secs

      Error: /project/gradlew: Command failed with exit code 1 Error output:

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: Some input files use or override a deprecated API.

      Note: Recompile with -Xlint:deprecation for details.

      Note: 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.

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':transformClassesWithMultidexlistForRelease'.

      > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.24.amzn1.x86_64/bin/java'' 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.

        at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

        at emitTwo (events.js:87:13)

        at ChildProcess.emit (events.js:172:7)

        at maybeClose (internal/child_process.js:818:16)

        at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

        • 1. Re: Android compile error: phonegap-plugin-csdk-image-editor
          simon.macdonald Adobe Employee

          What is the list of plugins you have in your project?

          • 2. Re: Android compile error: phonegap-plugin-csdk-image-editor
            ostaral28768068 Level 1

            Thanks for your quick reply. Below is my config.xml minus the icon and splash sections. I am using the gustavocampos barcode plugin because of the problem with the barcode plugin resetting the minimum android sdk version to 15. Obviously instead of <id> and <secret> I specify my values from Adobe.

             

            <?xml version="1.0" encoding="UTF-8"?>
            <widget xmlns     = "http://www.w3.org/ns/widgets"
                    xmlns:gap = "http://phonegap.com/ns/1.0"
                    xmlns:android = "http://schemas.android.com/apk/res/android"
                    id        = "com.ostarasystems.ostaraapp"
                    version   = "2.7">
                <name>Ostara</name>

                <description>
                    Ostara Systems Mobile Application
                </description>

                <author href="http://ostarasystems.com" email="licensing@ostarasystems.com">
                    Ostara Systems
                </author>

                <preference name="phonegap-version" value="cli-6.3.0" />
               
                <preference name="orientation"      value="default" />
                <preference name="target-device"    value="universal" />
                <preference name="fullscreen"       value="false" />
                <preference name="android-windowSoftInputMode" value="stateUnspecified|adjustPan" />
                <preference name="windows-target-version" value="8.1" />
                <preference name="android-minSdkVersion" value="16" />

             

                <gap:plugin name="cordova-plugin-camera" source="npm" />
                <gap:plugin name="cordova-plugin-device" source="npm" />
                <gap:plugin name="cordova-plugin-file" source="npm" />
                <gap:plugin name="cordova-plugin-file-transfer" source="npm" />
                <gap:plugin name="cordova-plugin-network-information" source="npm" />
                <gap:plugin name="cordova-plugin-geolocation" source="npm" />
                <gap:plugin name="cordova-plugin-inappbrowser" source="npm" />
                <gap:plugin name="cordova-plugin-globalization" source="npm" />
                <gap:plugin name="cordova-plugin-whitelist" source="npm" />
             
                <!--<gap:plugin name="phonegap-plugin-barcodescanner" source="npm" />-->
                <gap:plugin spec="https://github.com/gustavocampos/phonegap-plugin-barcodescanner" source="git" />
             
                <gap:plugin name="cordova-plugin-keyboard" source="npm" />
                <gap:plugin name="cordova-plugin-uniquedeviceid" source="npm" />
                <gap:plugin name="cordova-plugin-statusbar" source="npm" />
                <gap:plugin name="sqli-cordova-disk-space-plugin" source="npm" />

             

                <plugin name="phonegap-plugin-csdk-client-auth" spec="~1.0.0">
                  <param name="CSDK_CLIENT_ID_IOS" value="<id>" />
                  <param name="CSDK_CLIENT_SECRET_IOS" value="<secret>" />
                  <param name="CSDK_CLIENT_ID_ANDROID" value="<id>" />
                  <param name="CSDK_CLIENT_SECRET_ANDROID" value="<secret>" />
                </plugin>

                <plugin name="phonegap-plugin-csdk-image-editor" spec="~1.0.0" />

             

                <gap:config-file platform="android" parent="/manifest">
                  <!--<application android:allowBackup="false" />-->
                  <application android:debuggable="false" />
                  <supports-screens android:smallScreens="false" />
                </gap:config-file>
             
                <gap:platform name="ios" />
                <gap:platform name="android" />
                <gap:platform name="winphone" />

                <access origin="*" />
                <allow-intent href="http://*/*" />
                <allow-intent href="https://*/*" />
                <allow-intent href="tel:*" />
                <allow-intent href="sms:*" />
                <allow-intent href="mailto:*" />
                <allow-intent href="geo:*" />
                <platform name="android">
                  <allow-intent href="market:*" />
                </platform>

                <feature name="Camera">
                  <param name="wp-package" value="Camera" />
                </feature>
                <feature name="Device">
                  <param name="wp-package" value="Device" />
                </feature>
                <feature name="File">
                  <param name="wp-package" value="File" />
                </feature>
                <feature name="FileTransfer">
                  <param name="wp-package" value="FileTransfer" />
                </feature>
                <feature name="NetworkStatus">
                  <param name="wp-package" value="NetworkStatus" />
                </feature>
                <feature name="InAppBrowser">
                  <param name="wp-package" value="InAppBrowser" />
                </feature>
                <feature name="Globalization">
                  <param name="wp-package" value="Globalization" />
                </feature>
                <feature name="BarcodeScanner">
                  <param name="wp-package" value="BarcodeScanner" />
                </feature>
                <feature name="UniqueDeviceID">
                  <param name="wp-package" value="UniqueDeviceID" />
                </feature>

            </widget>

            • 3. Re: Android compile error: phonegap-plugin-csdk-image-editor
              simon.macdonald Adobe Employee

              Yeah, there may be an issue trying to use the barcode scanner and image editor in the same app. I've been meaning to dig into the barcode scanner some more. Can you try doing a compile without any barcode scanner plugin to see if the issue goes away? As well I have noticed that Gradle sometimes needs more memory which is why I updated cordova-android (Add gradle build flag to enable dex in process for large projects · apache/cordova-android@3a33f4c · GitHub ) but that hasn't made it to a release.

              • 4. Re: Android compile error: phonegap-plugin-csdk-image-editor
                ostaral28768068 Level 1

                Removing the barcode scanner plugin fixed the build issue, however I had two issues on using the app. Firstly, my phone would not upgrade the existing app with this new version. The message was "App not installed". When I removed the old version of the app and installed fresh from PGB then it worked.

                 

                Secondly, when I attempted to invoke the image editor on an image I had just taken with the camera the app bombed with the message "Unfortunately Ostara has stopped". The JS code I used was taken from the sample in the documentation and is given below. My test phone is a Samsung Galaxy S6 SM-G920F running Android 6.0.1:

                 

                I understand that these are different issues from the original question and if it would be better to raise them separately I will do that - I just wondered if it was something you have seen before.

                 

                try  {

                 

                  var options = {

                       outputType: Core.CommonTypes.CSDKImageEditor_OutputType_JPEG,

                  tools: [

                       Core.CommonTypes.CSDKImageEditor_ToolType_EFFECTS,

                       Core.CommonTypes.CSDKImageEditor_ToolType_CROP,

                       Core.CommonTypes.CSDKImageEditor_ToolType_TEXT

                  ],

                  quality: 50

                  };

                 

                  var self = this;

                 

                  CSDKImageEditor.edit(function (newImageUrl) {

                 

                     self.OnImageSuccess(newImageUrl, false);

                 

                  }, function (e) {

                 

                     Core.OstaraErrorHandler.HandleError(e);

                 

                  }, imageUrl, options);

                 

                } catch (e) {

                 

                  Core.OstaraErrorHandler.HandleError(e);

                  }

                • 5. Re: Android compile error: phonegap-plugin-csdk-image-editor
                  ostaral28768068 Level 1

                  Apologies, ignore the bit about the app not installing over a previous version. This was because I changed my Phonegap version from cli-6.1.0 to cli-6.3.0 - nothing to do with the plugin.

                  • 6. Re: Android compile error: phonegap-plugin-csdk-image-editor
                    simon.macdonald Adobe Employee

                    Yeah, I'm going to work on the official BarcodeScanner plugin to make sure it does not conflict with the CSDK plugins.