0

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#com.google.firebase.auth.internal.FederatedSignInActivity@android: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.

7
  • Is firbase plugin added in your project? Commented Jun 20, 2019 at 10:03
  • yes, it is added Commented Jun 20, 2019 at 10:04
  • The root cause is due to Firebase configuration which is updated. The error will not be present once you remove the plugin. github.com/dpa99c/cordova-android-support-gradle-release , plugin will help you to fix the problem. Commented Jun 20, 2019 at 10:41
  • I use push notifications and real time database, that's why I use the firebase plugin. If I will remove the plugin, then I will not be able to use that features. So, I finally didn't understand how to solve this. Which plugin can help me solve this problem? Commented Jun 20, 2019 at 11:03
  • 2
    cordova-plugin-firebase is out-of-date and is calling Firebase API functions than longer exist.TL;DR: use cordova-plugin-firebasex which is a fork that fixes these (and other) issues. See this answer for more detail. Commented Jun 20, 2019 at 11:36

1 Answer 1

1

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"
Sign up to request clarification or add additional context in comments.

2 Comments

i tried ur solution but not worked me i got- error in console: (node:25578) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, copyfile '/Users/apple/Desktop/klino/klino_user/plugins/cordova-plugin-firebasex/src/android/colors.xml'
There is already Ionic 5 out. And there is another way to do this all. Check it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.