7 Replies Latest reply on Mar 15, 2017 9:00 AM by AdamReed

    Tried to build app but came up with error

    Sunny Pek Level 1

      Edit my code and re-uploaded the code (deleted app and uploaded new .zip) but encountered an error. Was working fine yesterday but today I received this error.

       

      App id: com.keppel.onekeppel

       

      Build Date: 2017-02-03 02:50:27 +0000

      --------------------------------------------------------------------------------

      PLUGIN OUTPUT

      --------------------------------------------------------------------------------

      Fetching plugin "cordova-plugin-whitelist@1" via npm

      Installing "cordova-plugin-whitelist" at "1.3.1" for android

       

        This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

      --------------------------------------------------------------------------------

      COMPILE OUTPUT

      --------------------------------------------------------------------------------

      Subproject Path: CordovaLib

      Configuration on demand is an incubating feature.

      Incremental java compilation is an incubating feature.

      :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

      :CordovaLib:compileDebugNdk UP-TO-DATE

      :CordovaLib:compileLint

      :CordovaLib:copyDebugLint UP-TO-DATE

      :CordovaLib:mergeDebugShaders

      :CordovaLib:compileDebugShaders

      :CordovaLib:generateDebugAssets

      :CordovaLib:mergeDebugAssets

      :CordovaLib:mergeDebugProguardFiles

      :CordovaLib:packageDebugRenderscript UP-TO-DATE

      :CordovaLib:compileDebugRenderscript

      :CordovaLib:generateDebugResValues

      :CordovaLib:generateDebugResources

      :CordovaLib:packageDebugResources

      :CordovaLib:processDebugManifest

      :CordovaLib:generateDebugBuildConfig

      :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

      :prepareProjectCordovaLibUnspecifiedDebugLibrary

      :prepareDebugDependencies

      :compileDebugAidl

      :compileDebugRenderscript

      :generateDebugBuildConfig

      :generateDebugResValues

      :generateDebugResources

      :mergeDebugResources

      :processDebugManifest

      :processDebugResources/project/build/intermediates/manifests/full/debug/AndroidManifest.xm l:25:23-37: AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

        

      Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

      /project/build/intermediates/manifests/full/debug/AndroidManifest.xml:22: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

       

       

      FAILED

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugResources'.

      > com.android.ide.common.process.ProcessException: Failed to execute aapt

       

      * 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.704 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.

      /project/build/intermediates/manifests/full/debug/AndroidManifest.xml:25:23-37: AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

        

      Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.

      /project/build/intermediates/manifests/full/debug/AndroidManifest.xml:22: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

       

       

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugResources'.

      > com.android.ide.common.process.ProcessException: Failed to execute aapt

       

      * 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:106:13)

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

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

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

        • 1. Re: Tried to build app but came up with error
          dennisd42943628

          I had the same error today.

           

          In my config.xml i was pointing to icon and screen images like this: "www/res/icon/android/drawable-ldpi-icon.png"

          I my case the folder /res/icon didn't exists. I put all the images in the correct folders and the error was gone.

           

          Hope this helps for you.

          • 2. Re: Tried to build app but came up with error
            Sunny Pek Level 1

            Hi dennisd42943628 thanks for your help but I have checked through my icon linking and there wasnt an issue there. It still shows me the same error.

             

            Thanks for you help

            • 3. Re: Tried to build app but came up with error
              VectorP Level 4

              Do you have a default icon called 'icon.png' in the root of your zip file, next to config.xml and index.html, and did you specify so in your config?

              • 4. Re: Tried to build app but came up with error
                Sunny Pek Level 1

                Okay guys I found the problem, its because of the cli update.

                 

                To fix it, enter this - <preference name="phonegap-version" value="cli-6.3.1" /> in your config.xml under the </author> closing.

                • 5. Re: Tried to build app but came up with error
                  vangroover Adobe Employee

                  cli-6.5.0 includes an update from 5.2.2 to 6.0.2 so there will be breaking changes in there, primarily due to old plugins which access pre-6.0.0 resources etc.

                   

                  be sure to make sure all plugins are up to date

                  • 6. Re: Tried to build app but came up with error
                    AdamReed

                    After the last cli update I get the following, after previously normal output, when I build for Android - even after removing all plugins except whitelist, which was auto-added when I added the Android platform:

                     

                    ....

                    :packageDebug

                    Daemon stopping because JVM tenured space is exhausted

                    :packageDebug FAILED

                     

                    FAILURE: Build failed with an exception.

                     

                    * What went wrong:

                    Execution failed for task ':packageDebug'.

                    > Java heap space

                     

                    * 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 mins 15.597 secs

                    Error: /Users/areed2/Dropbox/cordova/tmom/platforms/android/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.

                     

                    FAILURE: Build failed with an exception.

                     

                    * What went wrong:

                    Execution failed for task ':packageDebug'.

                    > Java heap space

                     

                    * Try:

                    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

                     

                    So - what to do next? Is it possible that there is a newly introduced loop in the Cordova code? When I repeat $ cordova build --info, it terminates in exactly the same way, but without "Daemon stopping because JVM tenured space is exhausted".

                     

                    Yes, this is a large app - the default Cordova sample app does build OK. What can I do to help find the bug?

                    • 7. Re: Tried to build app but came up with error
                      AdamReed Level 1

                      Work-around: move video directories out of www. The build should check for videos under www, since they cannot be played in Android. Running out of Java heap space is a defect.