ionic capacitor build android fail processDebugGoogleServices missing - android

I work with ionic. I successfully make and build an app to ios with capacitor, but when I run command ionic cordova build android it run 'Success Buid'.
But when I run app from Android Studio throw error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':capacitor-cordova-android-plugins:processDebugGoogleServices'.
> No matching client found for package name 'capacitor.android.plugins'
I put google-info.json to the app. Add line to app build.gradle and projek build.gradle.

Fixed for me by renaming package_name to : capacitor.android.plugins in google-services.json

Related

Plugin intercom update to latest version cordova error at build/run

I want to update plugin intercom to latest version. I am using cordova version 9.0.0
For iOS works fine, but to update intercom for android I must have the version of platform >= 9.0.0
I updated from version 7.1.1 to 9.0.0 (android platform), but I got 2 errors. I think that is gradle cause these errors... Because I tried to make another fresh cordova project to see if everything works fine... but application does not run/build.
The text of errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script '..\platforms\android\cordova-plugin-intercom\be-intercom.gradle' line: 46
What went wrong:
A problem occurred evaluating script.
Could not find method execute() for arguments [] on task ':app:copyGoogleServices' of type org.gradle.api.tasks.Copy.
2: Task failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
compileSdkVersion is not specified. Please add it to build.gradle
I have google-services.json (in root).
Everything works fine before this update.
In ..\platforms\android\cordova-plugin-intercom\be-intercom.gradle at line 46 is tasks.copyGoogleServices.execute().
The solution is to replace the execute() with finalizedBy() in platforms\android\cordova-plugin-intercom\be-intercom.gradle and to copy google-services.json in platforms\android\app.
https://medium.com/#olku/gradle-5-0-broken-api-of-the-exec-task-5b2d76c8d121

Ionic Android Build - com.google.android.gms:play-services-measurement-base Error

My error:
:app:preReleaseBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
The library com.google.android.gms:play-services-measurement-base is being
requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]],
but resolves to 16.5.0. Disable the plugin and check your dependencies tree
using ./gradlew :app:dependencies.
I reinstalled the npm and cordova plugins for Firebase, I deleted the node-modules, the plugins and everything but the issue is still there and can't build the project.
Any thoughts?
This resolved my problem:
In your project folder execute cordova plugin add https://github.com/dpa99c/cordova-plugin-firebase#GH-1057-April-05-android-build-issue
ionic cordova platform rm android
ionic cordova platform add android.
You can find the solution here: https://github.com/arnesson/cordova-plugin-firebase/pull/1058
for ionic , go to projects.gardle and
change cordova.system.library.8=com.google.firebase:firebase-messaging:17.0.+ to (17.5.0)

Task 'assembleDevKernelDebug' not found in project ':app' - Android build using AppCenter

I have recently ejected my expo app using expo eject.
I have now tried to build using AppCenter, it gets about 4 minutes in and then fails with the following error message.
FAILURE: Build failed with an exception.
What went wrong: Task 'assembleDevKernelDebug' not found in project ':app'.
Can anyone point me in the right direction of how to fix this?
My android folder looks like this
My build.gradle looks like this

I have an error during a build to android in ionic cordova

When I run a commend "ionic cordova build android", i have error:
Execution failed for task ':app:processDebugGoogleServices'.
> No matching client found for package name 'io.ionic.starter'
I have a Firebase in my project. I found some solutions, but it's not working.
The id in the google-services.json should be like the id in the config.xml file.

Jenkins build failed with crashlytics

Trying to build android in Jenkins with crashlytics but every-time the error message is coming in log as
"FAILURE: Build failed with an exception.
Where:
Build file
What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'io.fabric']
Could not create plugin of type 'CrashlyticsPlugin'.
Could not initialize class com.crashlytics.tools.gradle.CrashlyticsPlugin"
Please help, tried this way also "Android Jenkins build fails with crashlytics"
It did not work.
You have to install Crashlytics jar manuel into Jenkins. From here.
I guess the plug-in is facing some problems when downloading this file from Amazon.
You can check here.

Categories

Resources