Hello Guys, How are you all? Hope You all Are Fine. Today In my app there is two compilation flavors configured HMS and GMS When compilation of flavors I am facing following error Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config in android. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
- How Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error Occurs ?
- How To Solve Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error ?
- Solution 1: configure flavors in build.gradle
- Solution 2: Use
productFlavors
block - Summary
How Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error Occurs ?
In my app there is two compilation flavors configured HMS and GMS When compilation of flavors I am facing following error.
Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processAppgalleryconnectLatestDebugAGCPlugin'.
> ERROR: Failed to verify AGConnect-Config '/client/package_name', expected: 'com.dise.appge.hms', but was: 'com.dise.appge.gms'
* 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.
How To Solve Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error ?
How To Solve Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error ?
To Solve Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error If you are using two flavors then I think You need to configure flavors in build.gradle. Something like below. and second solution is You should apply plugins in productFlavors block Something like this.
Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config
To Solve Execution failed for task ‘:app:processAppgalleryconnectLatestDebugAGCPlugin’ ERROR: Failed to verify AGConnect-Config Error If you are using two flavors then I think You need to configure flavors in build.gradle. Something like below. and second solution is You should apply plugins in productFlavors block Something like this.
Solution 1: configure flavors in build.gradle
If you are using two flavors then I think You need to configure flavors in build.gradle. Something like below.
if(getGradle().getStartParameter().getTaskNames().toString().contains("HMS")) {
apply plugin: 'com.huawei.agconnect'
}
This will avoid your problem of inconsistent package names in the JSON file.
Solution 2: Use productFlavors
block
You should apply plugins in productFlavors block Something like this.
flavorDimensions "vendor"
productFlavors {
google {
dimension "vendor"
apply plugin: "com.google.gms.google-services"
apply plugin: "com.google.firebase.crashlytics"
applicationIdSuffix ".gms"
}
huawei {
dimension "vendor"
apply plugin: "com.huawei.agconnect"
applicationIdSuffix ".hms"
}
}
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read