Closed CodeVINCI closed 4 years ago
Same. Google released new libraries yesterday which has for effect to break the build: https://firebase.google.com/support/release-notes/android#update_-_june_17_2019 or https://developers.google.com/android/guides/releases
I'm currently trying some ideas provided in https://github.com/arnesson/cordova-plugin-firebase/issues/1057 but no luck so far
Same here... getting tired of this Google moves every few months...
Same error since this morning
my configurations are
compile "com.google.firebase:firebase-core:16.0.8" compile "com.google.firebase:firebase-messaging:17.5.0" compile "com.google.firebase:firebase-config:16.4.1" compile "com.google.firebase:firebase-perf:16.2.4"
and using plugin version v2.0.5
just added platform new and try to build
getting same error
As m reading my build gradle version is 3.0.1 which is less than 3.2.1 and my compile sdkVersion is 27+ so just changing the settings for firebase messaging to the 19.0.0 version will not help.
Same issue here, tried to force firebase-iid version to 17.1.1 everywhere, but having another issue related to dex merge this time.
I think I've got it...let me double check
I solved the issue. The root problem is the wild card dependencies and the fact that, as I mentioned above, Google updated several libs yesterday.
Furthermore than the firebase-iid
I also faced for a long time the error D8: Program type already present: android.support.v4.app.INotificationSideChannel
even if the dependency was solved.
Here how I was to solve the issue for my apps:
Implement the hook and scripts displayed by @punksta (thx a lot) in https://github.com/arnesson/cordova-plugin-firebase/issues/1057#issuecomment-493917518
Provide the following dependencies respectively rewrite the dependencies as the following:
"com.google.firebase:firebase-core": "16.0.8",
"com.google.firebase:firebase-iid": "17.1.1",
"com.google.firebase:firebase-messaging": "17.5.0",
"com.google.firebase:firebase-config": "16.4.0",
"com.google.firebase:firebase-perf": "16.2.4",
"com.google.android.gms:play-services-tagmanager": "16.0.8",
"com.google.firebase:firebase-auth": "16.2.0"
Providing 17.1.1
for firebase-iid
solves the dependency wild card issue.
Providing 16.2.0
for firebase-auth
solves double class present in the class path issue.
UPDATE while this solution works great for the Cordova CLI v8. If you are using the CLI >= v9, or willing to migrate, have a look to the cleaner solution https://github.com/arnesson/cordova-plugin-firebase/issues/1081#issuecomment-503135862 provided @dpa99c here below
@peterpeterparker What is the gradle version you are using?
me using classpath 'com.android.tools.build:gradle:3.0.0'
@Kasun002 same classpath 'com.android.tools.build:gradle:3.3.0'
I have updated all the things you have mantioned (Also use the gradel version 3.3.0) but getting same error.in aditionally you mentioned i'm using classpath 'com.google.gms:google-services:4.1.0'
@peterpeterparker
You are probably using another plugins and therefore another dependency in your case should be fixed too
Have a look at the release notes from Google https://developers.google.com/android/guides/releases and try to identify which dependency you need to set
In my above code I used dependencies released <= March 27, 2019
Thanks @peterpeterparker , it worked perfectly!
@peterpeterparker thx for workaround, can you also help me a bit?
What sdk (target=android-27
) and platform engine (<engine name="android" spec="7.1.4" />
) are you using?
@denisnarush <engine name="android" spec="8.0.0" />
Thank you @peterpeterparker it works it's great.
Update 21 June 2019
See my updated solution below.
Original comment
Here's a solution which doesn't involve any local hacking of this plugin.
Note: this solution requires you to use the latest version of the cordova-android
platform (v8.0.0).
For example:
# create test project
cordova create test io.cordova.firebase.test && cd test
# download the Firebase SDK config for test project (which is required to make the build succeed)
curl https://raw.githubusercontent.com/dpa99c/cordova-plugin-firebase-test/master/www/google-services.json -o google-services.json
# add the latest cordova-android platform (v8.0.0)
cordova platform add android@latest
# add my fork of this plugin
cordova plugin add cordova-plugin-firebasex
# add plugin to enable AndroidX in the project
cordova plugin add cordova-plugin-androidx
# add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX
cordova plugin add cordova-plugin-androidx-adapter
# build!
cordova build android
@dpa99c I <3 you. Where to send a beer?)))
@dpa99c will test it here, curious that i'm already using this:
<plugin name="cordova-plugin-firebase" spec="https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue" />
you'r saving my life for second time HAHAHAHHAHA
@dpa99c ofc i will donate when i get home, u are my github issue hero ahhaahah
Here's a solution which doesn't involve any local hacking of this plugin.
* Use [my fork of this plugin](https://github.com/dpa99c/cordova-plugin-firebase) which is updated to resolve some recent issues. * Use [cordova-plugin-androidx](https://github.com/dpa99c/cordova-plugin-androidx) to enable AndroidX in the Android project. * Use [cordova-plugin-androidx-adapter](https://github.com/dpa99c/cordova-plugin-androidx) to dynamically patch the source code of this plugin to work with AndroidX.
Note: this solution requires you to use the latest version of the
cordova-android
platform (v8.0.0).For example:
# create test project cordova create test io.cordova.firebase.test && cd test # download the Firebase SDK config for test project (which is required to make the build succeed) curl https://raw.githubusercontent.com/dpa99c/cordova-plugin-firebase-test/master/www/google-services.json -o google-services.json # add the latest cordova-android platform (v8.0.0) cordova platform add android@latest # add my fork of this plugin cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase.git # add plugin to enable AndroidX in the project cordova plugin add cordova-plugin-androidx # add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX cordova plugin add cordova-plugin-androidx-adapter # build! cordova build android
console output
Thank you Dave.
When I install it on emulator, I see a notification: " App won't run unless you update google play services". Is that normal?
Thank you Dave.
When I install it on emulator, I see a notification: " App won't run unless you update google play services". Is that normal?
Presumably the new Play Services/Firebase library versions have a minimum version requirement for the installed core Play Services component. On a "real" Android device this would be self-updating so would be mostly up-to-date but in an emulator you need to manually update it.
On a "real" Android device this would be self-updating so would be mostly up-to-date but in an emulator you need to manually update it.
And before cordova-plugin-firebase directory was 93,9 MB, now 1,30 MB. Before cordova-plugin-cocoapod-support was not installed, now it is.
Are these ok? And why cordova-plugin-cocoapod-support installed while cordova-plugin-firebase plugin was installing?
And before cordova-plugin-firebase directory was 93,9 MB, now 1,30 MB. Before cordova-plugin-cocoapod-support was not installed, now it is.
Are these ok? And why cordova-plugin-cocoapod-support installed while cordova-plugin-firebase plugin was installing?
My fork incorporates (among other fixes) the yet-to-be-merged PR https://github.com/arnesson/cordova-plugin-firebase/pull/972 which uses Cocopods to satisfy the Firebase SDK library dependency on iOS rather than bundling a static snapshot of the SDK with the plugin. This makes it much easier to update the Firebase library version on iOS by simply bumping the Cocoapods version in the plugin.xml
.
After downgrading dependencies I get:
/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:659: error: resource android:attr/fontVariationSettings not found.
@dpa99c thank you so much for your solution, finally my app is building again.
I would like to understand why my app stopped working, because in a day it was working and another day it wasn't.
I use ionic, maybe ionic updates the dependencies before it creates the platforms folder? Also, where I can get more information in what have changed, and how it affected this plugin to make it to stop working?
Thanks in advance.
@murilolobato Google updated libs on Monday 17th June (https://developers.google.com/android/guides/releases). As this plugin is referencing dependencies with a wild card (like something@17+ and not something@17.0.1), when you performed a new build, the very last versions of these dependencies were fetched and these aren't compatible out of the box
this is what works for me #1084
@denisnarush
<engine name="android" spec="8.0.0" />
using cordova android 8 not able to run the project UnhandledPromiseRejectionWarning: Error [ERR_UNHANDLED_ERROR]: Unhandled error. (The platform βandroidβ does not appear to be a valid cordova platform. It is missing API.js. android not supported.)
Here's a solution which doesn't involve any local hacking of this plugin.
- Use my fork of this plugin which is updated to resolve some recent issues.
- Use cordova-plugin-androidx to enable AndroidX in the Android project.
- Use cordova-plugin-androidx-adapter to dynamically patch the source code of this plugin to work with AndroidX.
Note: this solution requires you to use the latest version of the
cordova-android
platform (v8.0.0).For example:
# create test project cordova create test io.cordova.firebase.test && cd test # download the Firebase SDK config for test project (which is required to make the build succeed) curl https://raw.githubusercontent.com/dpa99c/cordova-plugin-firebase-test/master/www/google-services.json -o google-services.json # add the latest cordova-android platform (v8.0.0) cordova platform add android@latest # add my fork of this plugin cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase.git # add plugin to enable AndroidX in the project cordova plugin add cordova-plugin-androidx # add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX cordova plugin add cordova-plugin-androidx-adapter # build! cordova build android
console output
After doing this, I get another type of error.
Task :app:compileDebugJavaWithJavac /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:26: error: package junit.framework does not exist import junit.framework.Assert; ^ /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:164: error: cannot find symbol Assert.assertNotNull("Context can not be null!", mContext); ^ symbol: variable Assert location: class LocationServiceIntentBuilder Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
Task :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 36s 33 actionable tasks: 33 executed /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:26: error: package junit.framework does not exist import junit.framework.Assert; ^ /Users/smartlogin/Desktop/SmartLogin-ionic/platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:164: error: cannot find symbol Assert.assertNotNull("Context can not be null!", mContext); ^ symbol: variable Assert location: class LocationServiceIntentBuilder Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 36s
Any ideas?
See release v3.3.0 to support cordova-android 7.x.x
. https://github.com/wizpanda/cordova-plugin-firebase-lib/pull/14#issuecomment-503499409
this simple solution worked for me: https://stackoverflow.com/questions/56645148/execution-failed-for-task-appprocessdebugresources-error/56666050#56666050 without upgrading cordova-android or anything
Using ionic cordova android and getting this error
Task :app:fabricGenerateResourcesDebug FAILED ERROR - Crashlytics Developer Tools error. java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null. Check the Crashlytics plugin to make sure that the application has been added successfully! Contact support@fabric.io for assistance. at com.crashlytics.tools.android.DeveloperTools.processApiKey(DeveloperTools.java:375) at com.crashlytics.tools.android.DeveloperTools.processProperties(DeveloperTools.java:517) at com.crashlytics.tools.android.DeveloperTools.processArgsInternal(DeveloperTools.java:348) at com.crashlytics.tools.android.DeveloperTools.gradleMain(DeveloperTools.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46) at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128) at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy:359) at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder.this$2$callDevtoolsWrappingRuntimeExceptions(FabricTaskBuilder.groovy) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169) at com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4.doCall(FabricTaskBuilder.groovy:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034) at groovy.lang.Closure.call(Closure.java:418) at groovy.lang.Closure.call(Closure.java:434) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:739) at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:712) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:301) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:293) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:175) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46) at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:748) 27 actionable tasks: 27 executed
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:fabricGenerateResourcesDebug'.
Crashlytics Developer Tools error.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 0s /home/pizone/ionic_project/Project_Orange/platforms/android/gradlew: Command failed with exit code 1 Error output: Note: /home/pizone/ionic_project/Project_Orange/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:fabricGenerateResourcesDebug'.
Crashlytics Developer Tools error.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Do we still need
<plugin name="cordova-android-support-gradle-release" spec="~1.4.4">
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
</plugin>
If so what should the value be?
@dpa99c when I try to install cordova-plugin-androidx or adapter it returns this:
Plugin doesn't support this project's cordova version. cordova: 7.0.1, failed version requirement: >=8.0.0
Skipping 'cordova-plugin-androidx' for android/ios
My Ionic info:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 8.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 19 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/myuser/Library/Android/sdk)
ios-deploy : 1.9.2
ios-sim : 6.1.2
NodeJS : v9.9.0 (/usr/local/bin/node)
npm : 5.7.1
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125
@Hanzofm cordova-plugin-androidx
requires a minimum of cordova@8.0.0
and cordova-android@8.0.0
.
According to the error message, the detected cordova
version is 7.0.1.
This constraint is applied by Cordova itself so check your environment setup.
In my opinion the installation is looking on the globally installed version of cordova cli, in my case 7.0.1, but in the project where I am installing the plugin the installed version is cordova-cli 8.1.2
@Hanzofm that will be your problem: the cordova
CLI is intended to be installed globally not locally.
My method for switching between multiple versions of cordova
is to use nvm to switch between node versions in which I have different versions of the cordova
CLI installed globally.
Anyway the plugins install correctly even the message.
Now the problem is the issue reported on
We finally got our system building after following the steps from this thread. The only thing we had to do manually was to change the FileProvider classname in the AndroidManifest.xml to the new androidx package name (androidx.core.content.FileProvider
). Without this change, our app would crash when launched in the emulator.
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="androidx.core.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
</provider>
We are getting the same error as @tarun57
> Task :app:fabricGenerateResourcesDebug FAILED ERROR - Crashlytics Developer Tools error. java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null. Check the Crashlytics plugin to make sure that the application has been added successfully! Contact support@fabric.io for assistance.
Anyone have any idea how to solve this?
Running: ionic cordova build android
@grantmaura use my fork of this plugin:
cordova plugin rm cordova-plugin-firebase && cordova plugin add cordova-plugin-firebasex
Also see here for details.
Ack, I didn't clean out the previous firebase plugin and that was causing it to continue failing. Thanks a bunch @dpa99c
@dpa99c everything works fine except I have to replace one occurrence android.support.v4.content.FileProvider with androidx.core.content.FileProvider manually. Any ideas what this is?
@heidji search your plugins/
directory to find which plugin it came from.
I'm guessing that you manually replaced it in AndroidManifest.xml
?
I'm thinking to extend cordova-plugin-androidx-adapter
to replace package names in AndroidManifest.xml
and project.properties
(as well as build.gradle
).
oh yeah I completely forgot it came from another plugin.. android gave me amnesia :/
@dpa99c the plugin that probably does that is com-darryncampbell-cordova-plugin-intent The Android manifest looks like that after a fresh platform add:
<provider android:authorities="${applicationId}.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" />
</provider>
@heidji I've just published cordova-plugin-androidx-adapter@1.1.0
to npm which also migrates references in project.properties
and AndroidManifest.xml
- please give it a try as it should resolve the problem above.
@dpa99c Yes it worked! thanks!
Describe the bug I think it is problem with the firebase version. The project was working till now and suddenly started showing error.
To Reproduce Steps to reproduce the behavior:
Expected behavior Build successful
Screenshots
Console Logs
Plugin Version using
Additional context The build was working fine yesterday.