7 Replies Latest reply on Aug 9, 2016 11:54 PM by JavierPeinado

    Android Build processDebugResources failed

    JavierPeinado

      I'm trying to build a simple web to Android. It's developed with the Phonegap desktop application and the previews are fine. But seems impossible to build online. Windows app compiles with no errors, but Android version always give the same error (Execution failed for task ':processDebugResources')

       

      This is the full log:

       

      Build Date: 2016-08-09 06:39:02 +0000

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

      PLUGIN OUTPUT

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

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

      COMPILE OUTPUT

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

      Observed package id 'build-tools;23.0.1' in inconsistent location '/android-sdk/build-tools/current' (Expected '/android-sdk/build-tools/23.0.1')

      Already observed package id 'build-tools;23.0.1' in '/android-sdk/build-tools/23.0.1'. Skipping duplicate at '/android-sdk/build-tools/current'

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

      :prepareProjectCordovaLibUnspecifiedDebugLibrary

      :prepareDebugDependencies

      :compileDebugAidl

      :compileDebugRenderscript

      :generateDebugBuildConfig

      :mergeDebugShaders

      :compileDebugShaders

      :generateDebugAssets

      :mergeDebugAssets

      :generateDebugResValues

      :generateDebugResources

      :mergeDebugResources

      :processDebugManifest

      :processDebugResources FAILED

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugResources'.

      > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/android-sdk/build-tools/23.0.1/aapt'' 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: 1 mins 2.201 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.

       

      FAILURE: Build failed with an exception.

       

      * What went wrong:

      Execution failed for task ':processDebugResources'.

      > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/android-sdk/build-tools/23.0.1/aapt'' 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 Build processDebugResources failed
          VectorP Level 4

          It's developed with the Phonegap desktop application and ...

          That's usually not the best start. Many developers report trouble after that, because they fail to change the assets structure into what Phonegap Build expects.

          Perhaps you didn't move the config, or you even may have uploaded the full Cordova project instead of your assets only.

           

          The best way to perform the changes:

          - move config.xml into /www

          - adjust the paths to icons and splashes in your config accordingly

          - zip up the contents of /www (not the directory itself) and upload that to PGB

          1 person found this helpful
          • 2. Re: Android Build processDebugResources failed
            JavierPeinado Level 1

            What name must have the zip file? I've just tried with just the /www directory containing a file name www.zip (containing html, img, js...) but Phonegap Build gives me the error: "Unable to create app: Error index.html not found"

             

            Maybe I must leave index.html out of the zip?

            • 3. Re: Android Build processDebugResources failed
              VectorP Level 4

              What name must have the zip file?

              "thisIsMyErrorfreeZipFile.zip"

              (or any other name)

               

              Maybe I must leave index.html out of the zip?

              No, of course not. The index.html would be your first document/page of the app.

               

              Please try deleting your app from PGB (as it may got caught in some deadlock), then create a new app by uploading the same zip file.

              If that doesn't fix the problem, then something else is wrong in your zipped project. In that case, it would be helpful to see the whole zip file, so you may want to upload it somewhere and post its url here.

              • 4. Re: Android Build processDebugResources failed
                JavierPeinado Level 1

                Same error. I think is a problem in an images folder. I'm testing with just one image and it works, but with all images gives an error. I'm doing more test to find what file is triggering the error. Maybe there is a limitation to number of characters in file names? Or a size limitation of files? Every files are using normal characters, so that cannot be the problem.

                • 5. Re: Android Build processDebugResources failed
                  wyattp35682249 Level 1

                  I am having the same exact error with the Android build... iOS works great. I think it is the icon and splash images as well. Does anyone have a current icon naming and structure link? It is very confusing with so many old links/pages out there...

                  • 6. Re: Android Build processDebugResources failed
                    JavierPeinado Level 1

                    I'm now compiling without errors. Seems like some images had too long names / bad characters. I changed them to something like 00.jpg, t00.jpg, 01.jpg... and it compiles without a problem.

                     

                    wyattp35682249, I'm using the structure generated by the desktop Phonegap application (folders /res and /spec). Just changed the png's, leaving the same names.

                    • 7. Re: Android Build processDebugResources failed
                      wyattp35682249 Level 1

                      Hey Javier, I just fixed this issue for my app. I went back to the PG image generator and noticed the fine text at the bottom:

                       

                      "If you use PhoneGap Build, don't forget .pgbomit under the res folder."

                       

                      Once I added the .pgbomit file to the res folder containing the icons and splashes it worked.

                      1 person found this helpful