Ad

ProcessDebugResources Error Appears While Building An Android Application Using Ionic 3

I have a project that was built on Ionic v3. Usually it was working, but some time passed and now it throws an error.

Current configuration is listed below:

ionic info

Ionic:

   Ionic CLI          : 5.0.3 (C:\Users\volkk\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:

   Cordova CLI       : not installed
   Cordova Platforms : android 7.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.2, (and 16 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (C:\android)
   NodeJS            : v10.15.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.7.0
   OS                : Windows 10

I am getting the following error:

Execution failed for task ':app:processDebugResources'.

I tried to change versions in the app/build.gradle, but that did not help me much.

I still believe that there is some version mismatch, because of some updates... Ofcourse I will try to resolve this problem by my own, but while I'm doing this, may be you can give me a good advice on how to fix this.

Here is a full build log: https://pastebin.com/zah1samG

UPDATE: I have installed a plugin called cordova-android-support-gradle-release and now I'm getting the following error:

> Task :CordovaLib:javaPreCompileDebug

Note: C:\Users\volkk\Downloads\Install\work\new\vagrant-php-box\sites\mobile application\platforms\android\CordovaLib\src\org\apache\cordova\engine\SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :CordovaLib:compileDebugJavaWithJavac

> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
> Task :app:javaPreCompileDebug
> Task :app:mainApkListPersistenceDebug
> Task :app:generateDebugResValues
> Task :app:generateDebugResources
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests

> Task :app:processDebugManifest
C:\Users\volkk\Downloads\Install\work\new\vagrant-php-box\sites\mobile application\platforms\android\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
        activity#[email protected]d:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present

> Task :app:processDebugResources

C:\Users\volkk\Downloads\Install\work\new\vagrant-php-box\sites\mobile application\platforms\android\app\src\main\java\org\apache\cordova\firebase\FirebasePluginInstanceIDService.java:6: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceIdService;
> Task :app:compileDebugJavaWithJavac FAILED
                              ^

UPDATE2:

I have updated all my stuff, now it looks like:

$ ionic info

Ionic:

   Ionic CLI          : 5.0.3 (C:\Users\volkk\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : not installed
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.2, (and 18 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (C:\android)
   NodeJS            : v10.15.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Here is the list of installed plugins:

$ ionic cordova plugins list
> cordova.cmd plugin ls

You have been opted out of telemetry. To change this, run: cordova telemetry on.
com-sarriaroman-photoviewer 1.1.18 "PhotoViewer"
cordova-android-support-gradle-release 3.0.0 "cordova-android-support-gradle-release"
cordova-background-geolocation 2.12.3-beta.1 "BackgroundGeolocation"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-cocoapod-supportx 1.6.1 "Cordova CocoaPods Dependency Support"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.0.2 "FilePath"
cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-qrscanner 2.6.0 "QRScanner"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"

But my build still fails.

Here is a build LOG: https://pastebin.com/L7JDayfd

I experience a simliar behaviour, if I use cordova-plugin-firebasex plugin.

Here is a build LOG: https://pastebin.com/FRMuKqhv

$ ionic cordova plugins list
> cordova.cmd plugin ls

You have been opted out of telemetry. To change this, run: cordova telemetry on.
com-sarriaroman-photoviewer 1.1.18 "PhotoViewer"
cordova-android-support-gradle-release 3.0.0 "cordova-android-support-gradle-release"
cordova-background-geolocation 2.12.3-beta.1 "BackgroundGeolocation"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-cocoapod-supportx 1.6.1 "Cordova CocoaPods Dependency Support"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.0.2 "FilePath"
cordova-plugin-firebasex 2.0.7 "Google Firebase Plugin"
cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-qrscanner 2.6.0 "QRScanner"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"

P.S.: If I uninstall the plugin cordova-plugin-androidx and cordova-plugin-firebasex then the build succeeds, but the google play services are not working correctly.

Ad

Answer

Problem solved, when I added all three plugins.

cordova-plugin-firebasex

cordova-plugin-androidx

cordova-plugin-androidx-adapter

Thanks to comment: https://github.com/arnesson/cordova-plugin-firebase/issues/1081#issuecomment-503135862

My current configuration:

ionic info

Ionic:

   Ionic CLI          : 5.0.3 (C:\Users\volkk\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.2, (and 19 other plugins)

Utility:

   cordova-res : 0.3.0
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (C:\android)
   NodeJS            : v10.15.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10


ionic cordova plugins list
> cordova.cmd plugin ls
com-sarriaroman-photoviewer 1.1.18 "PhotoViewer"
cordova-background-geolocation 2.12.3-beta.1 "BackgroundGeolocation"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-cocoapod-supportx 1.6.1 "Cordova CocoaPods Dependency Support"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.1 "Notification"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filepath 1.5.5 "cordova-plugin-filepath"
cordova-plugin-firebasex 2.1.0 "Google Firebase Plugin"
cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-qrscanner 3.0.1 "QRScanner"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 3.2.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
Ad
source: stackoverflow.com
Ad