You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/02/18 19:38:31 UTC

[GitHub] [cordova-android] bhandaribhumin opened a new issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

bhandaribhumin opened a new issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399


   # Bug Report
   
   
   
   ## Problem
   
   After updating Cordova-android to 10.1.1 and SDK version 31 build error 
   
   ### What is expected to happen?
   
   Build should work 
   
   ### What does actually happen?
   
   ```
   > Task :app:mergeDebugResources FAILED
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':app:mergeDebugResources'.
   > A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
      > Resource compilation failed. Check logs for details.
   ```
   
   
   ### config.xml
   
   
   ```
   <preference name="android-minSdkVersion" value="25" />
       <preference name="android-targetSdkVersion" value="31" />
       <preference name="android-compileSdkVersion" value="31" />
       <preference name="android-buildToolsVersion" value="31" />
    <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
               <activity android:exported="true" />
           </edit-config>
           <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/receiver[@android:name='nl.xservices.plugins.ShareChooserPendingIntent']">
               <activity android:exported="false" />
           </edit-config>
   ```
           
   ### Version information
   Ionic:
   
      Ionic CLI          : 6.18.1 (/)
      Ionic Framework    : ionic-angular 3.9.10
      @ionic/app-scripts : 3.2.4
   
   Cordova:
   
      Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
      Cordova Platforms : android 10.1.1
      Cordova Plugins   : cordova-plugin-ionic-webview 5.0.0, (and 22 other plugins)
   
   Utility:
   
      cordova-res : 0.15.4
      native-run  : 1.5.0
   
   System:
   
      Android SDK Tools : 26.1.1 (/Users/)
      ios-deploy        : 1.11.4
      ios-sim           : 8.0.2
      NodeJS            : v12.21.0 (/Users/)
      npm               : 6.14.11
      OS                : macOS Monterey
      Xcode             : Xcode 13.2.1 Build version 13C100
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [yes] I searched for existing GitHub issues
   - [yes ] I updated all Cordova tooling to most recent version
   - [yes ] I included all the necessary information above
   
   ![Screenshot 2022-02-17 at 6 12 31 PM](https://user-images.githubusercontent.com/3336047/154750267-2af6d9e0-ec81-4a23-bb91-304b2414c0c6.png)
   
   https://discuss.gradle.org/t/execution-failed-for-task-mergedebugresources-com-android-build-gradle-internal-res-resourcecompilerrunnable/39962
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] bhandaribhumin commented on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
bhandaribhumin commented on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1047810604


   Hi @breautek  Thanks for your help but I am facing the same problem with fresh(added few plugins) Cordova project using , don't know why because my system went wrong configuration or don't know what happened.
   I'll make a repo for you to understand where I'm doing wrong!
   
   [cordova-project-repo](https://github.com/bhandaribhumin/blank-cordova-10)
   
   ![Screenshot 2022-02-22 at 6 59 50 PM](https://user-images.githubusercontent.com/3336047/155143643-1659f3a8-ab81-4a56-9f88-5e040010db99.png)
   ![Screenshot 2022-02-22 at 6 59 42 PM](https://user-images.githubusercontent.com/3336047/155143654-e7a54288-920c-4879-8e85-165a308d82b9.png)
   
   
   Error: 
   ![Screenshot 2022-02-22 at 7 07 46 PM](https://user-images.githubusercontent.com/3336047/155144139-c3d22248-b8ee-4576-ac25-bfb2aafc117e.png)
   
   **Tried Java 8 and 11 both** 
   
   Current is : 
   ```
   java 11.0.11 2021-04-20 LTS
   Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194)
   Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)
   
   ```
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek edited a comment on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
breautek edited a comment on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1046449742


   Cordova doesn't support API 31 as I alluded to in my last message.
   
   Generally speaking, SDK API levels and build tools versions all need to match, so if you're attempting to build/compile against API 31, you'll need build tools 31+. However, cordova-android@10 only supported/tested up to API 30, and like I said, there are known incompatibilities with API 31 tooling.
   
   Therefore, you'll need to remove `<preference name="android-targetSdkVersion" value="31" />` or set it to `30`. cordova-android@10 will use target SDK 30 by default.
   Also note that the `android-compileSdkVersion` preference is obsolete in cordova-android@10 and no longer does anything. compile SDK version is always set to the target SDK version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] bhandaribhumin commented on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
bhandaribhumin commented on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1046047288


   @breautek Nope after changed buildToolsVersion to 30.0.3 issue remain same, shared few more details with you 
   
   ```
     <preference name="android-targetSdkVersion" value="31" />
       <preference name="android-compileSdkVersion" value="31" />
       <preference name="android-buildToolsVersion" value="30.0.3" />
   ```
   
   **CDV-gradle-config.json**
   
   ```
   {
     "MIN_SDK_VERSION": 25,
     "SDK_VERSION": 31,
     "GRADLE_VERSION": "7.1.1",
     "MIN_BUILD_TOOLS_VERSION": "30.0.3",
     "AGP_VERSION": "4.2.2",
     "KOTLIN_VERSION": "1.5.21",
     "ANDROIDX_APP_COMPAT_VERSION": "1.4.1",
     "ANDROIDX_WEBKIT_VERSION": "1.4.0",
     "GRADLE_PLUGIN_GOOGLE_SERVICES_VERSION": "4.3.10",
     "IS_GRADLE_PLUGIN_GOOGLE_SERVICES_ENABLED": true,
     "IS_GRADLE_PLUGIN_KOTLIN_ENABLED": false,
     "BUILD_TOOLS_VERSION": "30.0.3"
   }
   
   ```
   **Plugin list:**
   
   
   ```
   adobe-mobile-services 4.19.4 "ADBMobile"
   cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
   cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
   cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
   cordova-plugin-app-event 1.2.2 "Application Events"
   cordova-plugin-badge 0.8.8 "Badge"
   cordova-plugin-camera 3.0.0 "Camera"
   cordova-plugin-device 2.0.0 "Device"
   cordova-plugin-file-opener2 2.2.1 "File Opener2"
   cordova-plugin-file-transfer 1.7.2-dev "File Transfer"
   cordova-plugin-file 6.0.2 "File"
   cordova-plugin-geolocation 3.0.0 "Geolocation"
   cordova-plugin-globalization 1.11.0 "Globalization"
   cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
   cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
   cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
   cordova-plugin-localization-strings 3.2.1 "Localization"
   cordova-plugin-media 5.0.3 "Media"
   cordova-plugin-network-information 2.0.0 "Network Information"
   cordova-plugin-settings-hook 0.2.7 "Cordova Settings Hooks"
   cordova-plugin-splashscreen 6.0.0 "Splashscreen"
   cordova-plugin-statusbar 2.4.3 "StatusBar"
   cordova-plugin-streaming-media 2.3.0 "StreamingMedia"
   cordova-plugin-x-socialsharing 5.6.8 "SocialSharing"
   cordova-sqlite-storage 5.1.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
   cordova.plugins.diagnostic 5.0.1 "Diagnostic"
   es6-promise-plugin 4.2.2 "Promise"
   ionic-plugin-keyboard 2.2.1 "Keyboard"
   urbanairship-cordova 12.0.1 "Urban Airship"
   ```
   
   **Project.properties**
   
   
   
   ```
   arget=android-31
   android.library.reference.1=CordovaLib
   android.library.reference.2=app
   cordova.gradle.include.1=cordova-android-support-gradle-release/MiGuia-cordova-android-support-gradle-release.gradle
   cordova.gradle.include.2=cordova-plugin-badge/AppName-badge.gradle
   cordova.system.library.1=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.2=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.3=androidx.legacy:legacy-support-v4:1.0.0
   cordova.gradle.include.3=cordova-plugin-local-notification/AppName-localnotification.gradle
   cordova.system.library.4=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.5=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.6=androidx.appcompat:appcompat:1.0.0 // **tried all versions**
   cordova.gradle.include.4=urbanairship-cordova/AppName-build-extras.gradle
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1046449742


   Cordova doesn't support API 31 as I alluded to in my last message.
   
   Generally speaking, SDK API levels and build tools versions all need to match, so if you're attempting to build/compile against API 31, you'll need build tools 31+. However, cordova-android@10 only supported/tested up to API 30, and like I said, there are known incompatibilities with API 31 tooling.
   
   Therefore, you'll need to remove `<preference name="android-targetSdkVersion" value="31" />` or set it to `30`.
   Also note that the `android-compileSdkVersion` preference is obsolete in cordova-android@10 and no longer does anything. compile SDK version is always set to the target SDK version.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] bhandaribhumin edited a comment on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
bhandaribhumin edited a comment on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1046047288


   @breautek Nope after changed buildToolsVersion to 30.0.3 issue remain same, shared few more details with you 
   
   ```
     <preference name="android-targetSdkVersion" value="31" />
       <preference name="android-compileSdkVersion" value="31" />
       <preference name="android-buildToolsVersion" value="30.0.3" />
   ```
   
   **CDV-gradle-config.json**
   
   ```
   {
     "MIN_SDK_VERSION": 25,
     "SDK_VERSION": 31,
     "GRADLE_VERSION": "7.1.1",
     "MIN_BUILD_TOOLS_VERSION": "30.0.3",
     "AGP_VERSION": "4.2.2",
     "KOTLIN_VERSION": "1.5.21",
     "ANDROIDX_APP_COMPAT_VERSION": "1.4.1",
     "ANDROIDX_WEBKIT_VERSION": "1.4.0",
     "GRADLE_PLUGIN_GOOGLE_SERVICES_VERSION": "4.3.10",
     "IS_GRADLE_PLUGIN_GOOGLE_SERVICES_ENABLED": true,
     "IS_GRADLE_PLUGIN_KOTLIN_ENABLED": false,
     "BUILD_TOOLS_VERSION": "30.0.3"
   }
   
   ```
   **Plugin list:**
   
   
   ```
   adobe-mobile-services 4.19.4 "ADBMobile"
   cordova-android-support-gradle-release 3.0.1 "cordova-android-support-gradle-release"
   cordova-plugin-androidx-adapter 1.1.1 "cordova-plugin-androidx-adapter"
   cordova-plugin-androidx 2.0.0 "cordova-plugin-androidx"
   cordova-plugin-app-event 1.2.2 "Application Events"
   cordova-plugin-badge 0.8.8 "Badge"
   cordova-plugin-camera 3.0.0 "Camera"
   cordova-plugin-device 2.0.0 "Device"
   cordova-plugin-file-opener2 2.2.1 "File Opener2"
   cordova-plugin-file-transfer 1.7.2-dev "File Transfer"
   cordova-plugin-file 6.0.2 "File"
   cordova-plugin-geolocation 3.0.0 "Geolocation"
   cordova-plugin-globalization 1.11.0 "Globalization"
   cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
   cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
   cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
   cordova-plugin-localization-strings 3.2.1 "Localization"
   cordova-plugin-media 5.0.3 "Media"
   cordova-plugin-network-information 2.0.0 "Network Information"
   cordova-plugin-settings-hook 0.2.7 "Cordova Settings Hooks"
   cordova-plugin-splashscreen 6.0.0 "Splashscreen"
   cordova-plugin-statusbar 2.4.3 "StatusBar"
   cordova-plugin-streaming-media 2.3.0 "StreamingMedia"
   cordova-plugin-x-socialsharing 5.6.8 "SocialSharing"
   cordova-sqlite-storage 5.1.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
   cordova.plugins.diagnostic 5.0.1 "Diagnostic"
   es6-promise-plugin 4.2.2 "Promise"
   ionic-plugin-keyboard 2.2.1 "Keyboard"
   urbanairship-cordova 12.0.1 "Urban Airship"
   ```
   
   **Project.properties**
   
   
   
   ```
   arget=android-31
   android.library.reference.1=CordovaLib
   android.library.reference.2=app
   cordova.gradle.include.1=cordova-android-support-gradle-release/AppName-cordova-android-support-gradle-release.gradle
   cordova.gradle.include.2=cordova-plugin-badge/AppName-badge.gradle
   cordova.system.library.1=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.2=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.3=androidx.legacy:legacy-support-v4:1.0.0
   cordova.gradle.include.3=cordova-plugin-local-notification/AppName-localnotification.gradle
   cordova.system.library.4=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.5=androidx.legacy:legacy-support-v4:1.0.0
   cordova.system.library.6=androidx.appcompat:appcompat:1.0.0 // **tried all versions**
   cordova.gradle.include.4=urbanairship-cordova/AppName-build-extras.gradle
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] bhandaribhumin removed a comment on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
bhandaribhumin removed a comment on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1047810604


   Hi @breautek  Thanks for your help but I am facing the same problem with fresh(added few plugins) Cordova project using , don't know why because my system went wrong configuration or don't know what happened.
   I'll make a repo for you to understand where I'm doing wrong!
   
   [cordova-project-repo](https://github.com/bhandaribhumin/blank-cordova-10)
   
   ![Screenshot 2022-02-22 at 6 59 50 PM](https://user-images.githubusercontent.com/3336047/155143643-1659f3a8-ab81-4a56-9f88-5e040010db99.png)
   ![Screenshot 2022-02-22 at 6 59 42 PM](https://user-images.githubusercontent.com/3336047/155143654-e7a54288-920c-4879-8e85-165a308d82b9.png)
   
   
   Error: 
   ![Screenshot 2022-02-22 at 7 07 46 PM](https://user-images.githubusercontent.com/3336047/155144139-c3d22248-b8ee-4576-ac25-bfb2aafc117e.png)
   
   **Tried Java 8 and 11 both** 
   
   Current is : 
   ```
   java 11.0.11 2021-04-20 LTS
   Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194)
   Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.11+9-LTS-194, mixed mode)
   
   ```
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1399: Execution failed for task ‘:app:mergeDebugResources’. com.android.build.gradle.internal.res.ResourceCompilerRunnable

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1399:
URL: https://github.com/apache/cordova-android/issues/1399#issuecomment-1045078823


   cordova isn't compatible with build tools 31. Use build tools 30.0.3 instead.
   
   I understand the error message regarding compatible build tools version that cordova gives is misleading, that issue is tracked at https://github.com/apache/cordova-android/issues/1391.
   
   Closing as duplicate (https://github.com/apache/cordova-android/issues/1288)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org