I am using this library for displaying directions: https://github.com/akexorcist/Android-GoogleDirectionLibrary/blob/master/app/src/main/java/com/akexorcist/googledirection/sample/SimpleDirectionActivity.java. Previously I created a google maps activity, and the google_maps_api.xml was generated. I deleted this file because I don't believe I need it anymore, but now I get an error in my manifest file saying
"No resources found that match the given name(at 'value' with value '#string/google_maps_key') Can I simply delete the meta data tage seen below or is there a better option to clean things up?
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
Related
We are using GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(context) to check for google services before showing a map. Even though the device has access to play services, the method is throwing an exception when being called. The exception is GooglePlayServicesIncorrectManifestValueException with the message:
“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
<application> element:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />”
In the manifest I’ve declared:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
If I go into the play services version, I get:
<integer name="google_play_services_version">12451000</integer>
Which comes from
jetified-play-services-basement-18.1.0/res/values/values.xml
I’ve tried most solutions in other stack overflow posts to no avail. These are all the things I’ve tried and none of them work:
Change tag order in manifest (https://stackoverflow.com/a/37810158/8575762). This has no effect, and also it makes no sense that it should have one.
Make sure we are not providing our own hardcoded version (https://stackoverflow.com/a/63791222/8575762)
Remove the <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" /> tag from the manifest.
Update firebase libraries to latest BOM version (30.5.0)
Remove firebase libraries completely.
Update play services dependencies to latest version(auth, auth-api-phone, vision, wallet, location, safetynet)
Update google services plugin to latest version (4.3.13)
Add tools:node="replace" (also tried other manifest options like node:replace, etc) to the metadata tag & hardcode the version value
If I inspect the AndroidManifest on the built apk (debug), the value of the meta-data tag is the following:
<meta-data
android:name="com.google.android.gms.version"
android:value="#ref/0x7f0b000f" />”.
It’s important to note that this behavior is not 100% consistent. Usually I’ll do a fresh install and the first time I launch the app the isGooglePlayServicesAvailable method returns without crashing. If I restart the app it no longer works.
This seems like a bug in the services implementation library to me, but it feels like something too simple to be failing like that.
Any help would be appreciated, thanks in advance.
I read a lot of related posts, but I didn't get the solution.
I use the ActiveAndroid library for the database and released my program, but I having trouble in updating the new version.
In the new version of the application, a table is added to the database. Therefore, the database must be updated.
(I made the changes and increased the database version ).
manifest file:
<meta-data
android:name="AA_DB_NAME"
android:value="KashanTakhfifi" />
<meta-data
android:name="AA_DB_VERSION"
android:value="2" />
<meta-data
android:name="AA_MODELS"
android:value="DBTableModel.TableNotificationModel, DBTableModel.TableGuideModel" />
But when the new app is install or update,The program will be crash.
because happen error: no such table(which means the database is not updated).
I read in the other posts : the app should be removed and reinstalled.
But I've released the app and this problem is not logical for users.
If I want to delete this library, I will have to make a lot of changes to my code...
What is the solution for me.
I'm working on a small Android app which involves Google Maps (created with Android Studio by selecting the Google Maps activity template).
It works fine on my test phone, but when I build a signed APK and install it on another phone, the map is blank.
After some Googling, perhaps the cause of the problem is because I'm using the wrong key.
I have this line in google_maps_api.xml:
<string name="google_maps_key" translatable="false" templateMergeStrategy="preserve">AIzaxxxxxxxxxxxxxxxxxx</string>
Change that into:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaxxxxxxxxxxxxxxxxxx" />
Android Studio complains:
Error: Can't determine type for tag ''
Pardon the screenshot. For unknown reasons, the whole error message cannot be displayed properly on SO. How to solve this?
The meta-data should be placed in AndroidManifest.xml file witinh application tag.
To avoid my API keys from getting committed on source control (git) I have made an XML resource file called api_keys.xml under the values directory. This file is listed under .gitignore.
I access these string resources the usual way by using #string/.. or .getString(R.string...). This approach works everywhere but in the manifest.xml file.
I have fabric set-up and in the manifest file this is how I try to pass the key -
<meta-data
android:name="io.fabric.ApiKey"
android:value="#string/FABRIC_API_KEY" />
But, when I try to build the APK I get the following error -
Error:Execution failed for task ':app:fabricGenerateResourcesDebug'.
Crashlytics Developer Tools error.
This error goes away if I replace #string/FABRIC_API_KEY with the actual key.
Is there a way I can fix this? Or any other approach I can use to prevent my API keys form getting published on the source control.
Today when I tried to upload an update of my app, I got this from Google Play console:
UPLOAD NEW APK TO PRODUCTION
Upload failed Your APK cannot be analyzed using 'aapt dump badging'.
Error output: Failed to run aapt dump badging: ERROR getting
'android:value' attribute for meta-data:attribute could not be found
I can upload normally before. I haven't made any change in AndroidManifest.xml.
The app is built via ant. I also tried building it again, even with the last-known-good code, the same error occurs.
Should I report this to Google Play team, or is it a known issue of Google Play?
Is there any work around?
It's now acknowledged by Google:
Some developers have reported seeing the error "Failed to run aapt dump badging: ERROR getting 'android:value' attribute for meta-data:attribute could not be found" when attempting to upload their .apk.
We're working on solving this problem. In the meantime, you can try adding the "android:value" to any meta-data manifest property that lacks that attribute. See API Guides - for more information.
https://support.google.com/googleplay/android-developer/known-issues/24493
I had the exact same problem, but managed to fix it now.
The problem is definitely in your manifest file. For me it was the Samsung MultiWindow feature. I found the solution here: Google Code Issue 46311
I had to change
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="#dimen/app_defaultsize_w"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="#dimen/app_defaultsize_h"/>
into
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632dp"/>
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598dp"/>
Worked fine since yesterday, but now i had to change it.
Hope it helps.
Same problem here after generating new apk for alpha release with same certificate I get the error (in Dutch):
Upload mislukt
Uw APK kan niet worden geanalyseerd met 'aapt dump badging'. Foutuitvoer:
Failed to run aapt dump badging:
ERROR getting 'android:value' attribute for meta-data:attribute could not be found
I found one place in my Manifest where I use android:value for samsun multiwindow support.
<meta-data
android:name="com.sec.android.support.multiwindow"
android:value="true" />
I removed that from the Manifest. generated new apk (after project clean rebuild) and got the same error. This Manifest worked in my apk when uploading a previous version two weeks ago.
Use
android:name="some string value"
Instead of
android:name="#string/name_of_string_resource"
In my case, when building for ionic I forgot to add the .aab extension in the command land
I entered this into the cmd line
zipalign -v 4 app-release.aab appname_2.0.0
instead of
zipalign -v 4 app-release.aab appname_2.0.0.aab