3 Replies Latest reply on Jul 23, 2016 1:19 AM by VectorP

    How to get Crosswalk to work with Phonegap Build

    jwarzecha

      I have a native app that I'm using Phonegap Build to compile. I am trying to use the Crosswalk Webview plugin in my app.

      According to the official Phonegap blog, all plugins are now hosted on NPM. According to this blog post, plugins tagged ecosystem:cordova should work with Phonegap Build.

      While trying to include the cordova-plugin-crosswalk-webview (here), Phonegap Build fails with a very generic error message ("Oh geez. Your build failed. Sorry, but a problem occurred on the build server").

      Has anyone else experienced this? Or has anyone else been able to get Crosswalk to work with Phonegap Build?

        • 1. Re: How to get Crosswalk to work with Phonegap Build
          VectorP Level 4

          "I have a native app that I'm using Phonegap Build to compile."

          That doesn't sound right. Are you sure you coded natively? Isn't it rather a hybrid app with HTML5 code, to be executed in a webview component?

           

          "Phonegap Build fails with a very generic error message"

          What does your build log say? The specific messages can be found there.

          Perhaps you need the gradle engine.

          Perhaps the error has nothing to do with Crosswalk, but rather something else in your package (like a non-existing PGB version, incorrect 'feature' elements, etc.)

          • 2. Re: How to get Crosswalk to work with Phonegap Build
            jwarzecha Level 1

            My build log is as follows:

             

            Build Date: 2016-07-22 16:59:48 +0000

            null

            embedded

            org.xwalk:xwalk_core_library:17+

            Download https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_l ibrary/17.46.448.10/xwalk_core_library-17.46.448.10.pom

            Download https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_l ibrary/17.46.448.10/xwalk_core_library-17.46.448.10.aar

            :preBuild UP-TO-DATE

            :preArmv7ReleaseBuild UP-TO-DATE

            :checkArmv7ReleaseManifest

            :preArmv7DebugBuild UP-TO-DATE

            :preX86DebugBuild UP-TO-DATE

            :preX86ReleaseBuild 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:generateDebugAssets UP-TO-DATE

            :CordovaLib:mergeDebugAssets

            :CordovaLib:processDebugManifest

            :CordovaLib:processDebugResources

            :CordovaLib:generateDebugSources

            :CordovaLib:compileDebugJavaWithJavacNote: 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:generateReleaseAssets UP-TO-DATE

            :CordovaLib:mergeReleaseAssets

            :CordovaLib:processReleaseManifest

            :CordovaLib:processReleaseResources

            :CordovaLib:generateReleaseSources

            :CordovaLib:compileReleaseJavaWithJavacNote: 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

            :prepareComAndroidSupportSupportV42400Library

            :prepareOrgXwalkXwalk_core_library174644810Library

            :prepareProjectCordovaLibUnspecifiedReleaseLibrary

            :prepareArmv7ReleaseDependencies

            :compileArmv7ReleaseAidl

            :compileArmv7ReleaseRenderscript

            :generateArmv7ReleaseBuildConfig

            :generateArmv7ReleaseAssets UP-TO-DATE

            :mergeArmv7ReleaseAssets

            :createXwalkCommandLineFileArmv7Release

            :generateArmv7ReleaseResValues

            :generateArmv7ReleaseResources

            :mergeArmv7ReleaseResources

            :processArmv7ReleaseManifest

            :processArmv7ReleaseResources

            :generateArmv7ReleaseSources

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

             

            :compileArmv7ReleaseNdk UP-TO-DATE

            :compileArmv7ReleaseSources

            :transformClassesWithDexForArmv7Release

            UNEXPECTED TOP-LEVEL EXCEPTION:

            com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;

            at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)

            at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)

            at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)

            at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)

            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)

             

             

            FAILED

             

            FAILURE: Build failed with an exception.

             

            * What went wrong:

            Execution failed for task ':transformClassesWithDexForArmv7Release'.

            > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101.x86_64/bin/java'' finished with non-zero exit value 2

             

            * 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: 1 mins 20.576 secs

            undefined

            • 3. Re: How to get Crosswalk to work with Phonegap Build
              VectorP Level 4

              May be caused by conflicting Android Support library versions in plugins. Not necessarily Crosswalk.

              Are you by any chance using Facebook, Push notification, and/or Google Analytics plugins together?