-
Notifications
You must be signed in to change notification settings - Fork 106
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
Merged Manifest error #41
Comments
Just to clarify, you saw the error despite having the API key, |
Correct, I have a |
This issue still exist on following the documentation provided by google on is there any workaround for this or a fix?. |
Please provide more info on how to repro this issue as well as the version of the library and AGP that you are using. |
AGP version 7.2.2 Steps to repro
Workaround A simple workaround is to define a manifest placeholder in the build.gradle(app module) file.
However as this is not mentioned anywhere in the samples/documentation i believe this is a bug. |
I tried to reproduce the issue you mentioned in 707b1a5. Based on your report, the sample app should not be able to be built due to a merged manifest error when introducing a |
Hi i tried this with new project with JAVA as the preferred language and the problem still exists.
and the callback as follows
|
Any resolution to this error? |
With the latest stable tools (AS Electric Eel 2022.1.1, AGP 7.4.0, Gradle 7.5) I no longer have this issue. |
The issue is still there, though AS is now able to display the merged manifest even if there are errors. |
I added a key to the local.propery file but my manifest has no idea what is the "MAP_API_KEY" and it throws errors when building. What I am doing wrong? |
Check if you add this plugin AFTER the |
Alright. Now, I have the following code that may help somebody one day. First, be sure that your API key works. You can check this if you try Google Maps API through web queries. Second, I added the following row to my "local.properties" file. Third, I created an associative variable inside "build.gradle" file.
Now we have "googleMapsApiKey" name that'll be used in the Manifest. Fourth, Android Manifiest should look like this.
Notice, the teg "meta-data" is between the "application" tag and "activity" one. Also, Google Map Documentation says use the following "meta-data"
HOWEVER, I replaced it with this one.
Fifth, if it is still a problem to present a map but you can see Google's logo, you are on the right way. I checked the internet connection and noticed it didn't work. So, please, be sure that your device has the internet spot. Recently, I used MapView element instead of Fragment, and I had initialization problems, please, change your MapView to Fragment.
|
@ArtemBatkov you don't actually need to manually parse the properties file. As mentioned in the original message setting the placeholder to an empty value is enough to fix the merged Manifest view.
|
Well, all what you have to do is to add the secret plugin of google maps inside the gradle file of the same module that you use your map api key on it.
|
i tried @TarekIdrees solution, and it works, thumbs up! |
So I followed this guide from the Maps SDK to add the API key to the app.
Now in Android Studio the Merged Manifest view no longer works which in turn also breaks the
MissingPermission
lint.Android Studio shows this error when viewing the Merged Manifest:
MissingPermission
lint warning, despite the permissions being inAndroidManifest.xml
:A workaround would be to manually add
manifestPlaceholders = [MAPS_API_KEY: ""]
to the app build.gradle, but this feels wrong.Is there a better way to avoid this, or is this more an error by Android Studio or the Android Gradle plugin?
The text was updated successfully, but these errors were encountered: