I'm working in a massive use app that has been working for about 4 years, in the last release was implemented some new libraries, after that implementation we have facing some issues when trying to check if Google Play Services are available, this only happens on Huawei devices with Android 8+. The logcat show us this stack trace
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 12451000 but found 4323000. You must have the following declaration within the element:
We have the correct values on manifest:
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXX" />
If we follow the value of google_play_services_version, we can found the expected value from play-services-basement-16.1.0.aar
<integer name="google_play_services_version">12451000</integer>
This are the libs implemented on gradle
implementation "com.android.support.constraint:constraint-layout:$constraint"
implementation "com.android.support:appcompat-v7:$support"
implementation "com.android.support:design:$support"
implementation "com.android.support:cardview-v7:$support"
implementation "com.android.support:recyclerview-v7:$support"
implementation "com.android.support:design:$support"
implementation "com.android.support:support-v4:$support"
implementation "com.android.support:mediarouter-v7:$support" //New Lib
implementation "com.android.support:animated-vector-drawable:$support" //New Lib
implementation "com.android.support:design:$support"
implementation "com.android.support:support-vector-drawable:$support"
//Play services
implementation "com.google.android.gms:play-services-maps:$playServices"
implementation "com.google.android.gms:play-services-analytics:$playServices"
implementation "com.google.android.gms:play-services-gcm:$playServices"
implementation "com.google.android.gms:play-services-safetynet:$playServices"
implementation "com.google.android.gms:play-services-wearable:$playServices"
With this versions
ext {
//build
sdkCompileVersion = 27
sdkMinVersion = 16
sdkTargetVersion = 27
sdkBuildToolsVersion = '27.0.3'
//dependencies
support = '27.1.0'
playServices = '16.0.0'
newRelic = '5.18.0'
constraint = '1.1.2'
}
Does anyone have an idea how to solve this issue?