Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver #119

Closed
martintsan opened this issue Jul 12, 2019 · 8 comments

Comments

@martintsan
Copy link

martintsan commented Jul 12, 2019

I've setup everything on my ionic project and it works well on iOS devices. Unfortunately, it didn't work when I built android, I met some issues and solved a lot, but for this one I'm totally stuck. I hope anyone met this before and can help me, I'll appreciate.

WX20190712-092636@2x

image

@chemerisuk
Copy link
Owner

Version 3 uses AndroidX dependencies, try to install version 2:

npm i cordova-plugin-firebase-analytics@^2

@martintsan
Copy link
Author

Version 3 uses AndroidX dependencies, try to install version 2:

npm i cordova-plugin-firebase-analytics@^2

Thanks for the tips, @chemerisuk. But when I tried npm i cordova-plugin-firebase-analytics@^2, I got a package not found error, then I tried npm i cordova-plugin-firebase-analytics@2.0.0 it worked for installation.

After that I rebuild the android app, it built successfully. Then I did the last step which need add firebase SDK like the following instruction:

image

I got a error

Cannot add extension with name 'googleServices', as there is an extension already registered with that name.

I found it because I added this line apply plugin: 'com.google.gms.google-services'. When I remove that, it still showed up more errors. Then I got lost.

@chemerisuk
Copy link
Owner

@martinnett this gradle plugin added for you automatically, you don't need to change files manually

@khoabuidev
Copy link

I have the same problems like @martinnett, I have to downgrade to version 2.0

@florianmonfort
Copy link

@martinnett this gradle plugin added for you automatically, you don't need to change files manually

If we do that the app just crashes actually....

@davidquon
Copy link

Seems to also be fixed by doing something similar to what is described here arnesson/cordova-plugin-firebase#1081 (comment).

When I added these everything seems to play nice together using Version 3 with Android X dependencies.

$ ionic cordova plugin add cordova-plugin-androidx
$ ionic cordova plugin add cordova-plugin-androidx-adapter

Ribeiro-Tiago pushed a commit to Ribeiro-Tiago/work-clocker that referenced this issue Oct 8, 2019
@florianmonfort
Copy link

@davidquon what about in Ionic 4?

@chemerisuk
Copy link
Owner

Duplicates #130

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants