Error with <uses-library android:name="com.google.android.maps"/> - android

I'm trying to develop an app using google maps, but don't know why it still gives me the error, I recheck my manifest file all seems to be ok. here is the manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.interstars"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:name="com.google.android.maps"/>
<activity
android:name="com.example.interstars.InterMainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Error
2 08:47:06 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for C:\Users\uchman\Documents\Work place\InterStars\AndroidManifest.xml: Attribute name "uses-library" associated with an element type "application" must be followed by the ' = ' character.
What sort of thing I missing? I'm still a beginner in android programming.

try put
<uses-library android:name="com.google.android.maps"/>
this line after all activity tags and before the end of application Tag

thanks for all your help..
After stressing myself too much, i decieded to use GoogleMaps API V2. And thanks to the tutorials in https://developers.google.com/maps/documentation/android/ i was able to fix google maps to my app.
P.S GoogleMaps API V2 is much easier for both the user and programmer And no need for the uses-library. All that is required is the Google Play lib..

Try this:
<uses-library android:required="true" android:name="com.google.android.maps"></uses-library>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
The Target of your code must be set on Google API and not Android API.
Your project folder --> properties --> android --> In the project build target select the Google API for your API level.

Please try this :
Right click your projects and click "Android Tools"
Click "Add support Library" and directly add the library
Afterward run this.

I am not Sure but i have faced Same error Once i have started mapview.
the Way i got work around is as below:
if you have copy and paste below line
<uses-library android:name=”com.google.android.maps” />
then the quote("") got turned into a different ASCII VALUE quote character.
You Should Retype the quote characters.
Similar question

Related

Google play Key in manifest made a lot of errors and red exclamation mark

So i followed this guide https://developers.google.com/maps/documentation/android-api/signup
and created a new Google Developer Console project in here
https://console.developers.google.com/home
I put my Eclipse project package name and got the Google Key.
Now as the guide said i added this to my manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_API_KEY"/>
and after i did that i have got a lot of errors in my project and there's also an red exclamation mark near all of my projects of this workspace.
So what I'm doing wrong? I just want to start develop using google play. And please, i read all the guides in their and eclipse's and i still can't get it to go.
EDIT
I think i might missed the google play services library. I cant find where to download it.
manifest: as requested.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.minyan.get.dl"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="23" />
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission
android:name="android.permission.INTERNET"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MyLocation"
android:label="#string/title_activity_my_location" >
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k />
</application>
</manifest>
Like in the guides the <meta data /> is in the application tag.
To make the Google Play services APIs available to your app:
Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects.
Import the library project into your Eclipse workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
After you've added the Google Play services library as a dependency for your app project, open your app's manifest file and add the following tag as a child of the <application> element:
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Basically google play services library is not needed to download, it resides in your SDK only
and here is the path, you can find the library
.../sdk/extras/google/google_play_services/libproject/google-play-services_lib
I think the following could solve your problem:
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k" />
^
!

Element type "application" must be followed by either attribute specifications, ">" or "/>" #2

I keep getting an error that says, "Element type "application" must be followed by either attribute specifications, ">" or "/>"."
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.thenewboston.sammy"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
I'm getting the error right below this:
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
This is the right form, see if you didn't close some tags.
<application android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
...>
<activity ...>
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
As my friend said , check the right format
For me It was like this :
BEFORE :
<activity android:name=".DisplayMessageActivity" android:label="display_message_activity"
</activity>
AFTER:
<activity android:name=".DisplayMessageActivity" android:label="display_message_activity" >
</activity>
Then the error disappeared
In my case, a comment had been placed (by the build tools?) inside the application tag:
<application android:allowBackup="true"
<!-- android:debuggable="true" -->
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/GdxTheme">
After I removed the entire debuggable=true comment line - everything worked.
I just ran into this error for a completely different reason. For some reason Android Studio had replaced every instance of the string name with "name" (e.g. it wrapped them all in double quotes) in my XML. It completely broke everything.
I had to clear out the double quotes from everything, clean the project and rebuild it.
If you're a flutter developer and you're getting this exception you must know there are two AndroidManifest file in your flutter project. One is inside debug folder and another one is main folder. My main folder AndroidManifest is ok and well formatted but AndroidManifest in debug folder is not ok and not well formatted due to a git conflict.
you must fix this.

Application is suddently not compatible with tablets on Google Play

my application was "visible" on Google play. I did not make any changes (I did not upload new apk) and application is suddently not compatible with tablets. Thanks for any help.
Look at very simple manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fly.is.fun.unlocker"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="7" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="fly.is.fun.unlocker.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Please check whether it's not visible on any device or some specific devices.
I had the same problem. But that was specific to Tab2.
Because I was using CAMERA permissions and Tab2 doesn't have autofocus for camera.
So I added following line in AndroidManifest file and then uploaded new apk to market.
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
Now it's visible in Google play.
Also check Filters on Google Play
Hope this helps.
In developer console, you only can see small, normal, large. You may try to add android:targetSdkVersion with a value higher or equal to 11

yet another INSTALL_FAILED_MISSING_SHARED_LIBRARY when using Google Maps on Android

I went through all the articles about the INSTALL_FAILED_MISSING_SHARED_LIBRARY issue in Google Maps projects but I couldn't find a case similar to mine nor a solution, so here is my problem:
I have a project with an activity (com.example.googleMaps.AndroidGoogleMapsActivity) that inherits from MapView to show a Google Map and do some stuff.
I run it on a Samsung Galaxy S II and it works fine: it shows the map and does the stuff it is supposed to do.
Now.
I want to use this project as a library for another project and show that activity as the first screen of another app.
So I checked the box Is Library, I created a new android project that builds against GoogleAPI and includes the library in the Android properties in Eclipse with the following manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<uses-library android:name="com.example.googleMaps" required="true" />
<uses-library android:name="com.google.android.maps" required="true" />
<activity android:name="com.example.googleMaps.AndroidGoogleMapsActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I run this new project on my device and I get the infamous error:
INSTALL_FAILED_MISSING_SHARED_LIBRARY
and LogCat is totally silent.
I would like to point out that the activity inside the library works so none of the well know issues should apply.
In the client project I specify two uses-library tags (one for my library and one for the Google library), I build against GoogleAPI, include the library in the Android properties in Eclipse and run on a tested device.
Am I still missing something?
I had the same problem, just remove the line:
<uses-library android:name="com.example.googleMaps" required="true" />
and it should work.
Only Use com.google.android.maps. Please remove another one.

All of a sudden the Maps in my Android Map stop working and all I see are a bunch of X's

I've deleted my debug key, generated a new one, gotten the new MD5 fingerprint and registered that with google and used the new API key in my layout XML, still broken. It was all working fine until a few days ago. Now all my maps are just a bunch of X's. Any ideas?
Do I need to sign my app for debug/development? All I have done so far is generate the fingerprint and used that to get an API key, am I missing a step perhaps?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.elon.ecs"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<service android:name="NewsEvents_Service"></service>
<activity android:name=".ECS"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="ElonMap"></activity>
<activity android:name="NavigationActivity"></activity>
<activity android:name="NewsEvents"></activity>
<activity android:name="EditKeywords"></activity>
<activity android:name="FullNewsEvent"></activity>
<activity android:name="OnTheJob"></activity>
</application>
<uses-sdk android:minSdkVersion="4"/>
</manifest>
Have you checked that your permissions are still OK? You need the INTERNET permission to download the map tiles.
I've also been bitten, by putting the <uses-permission> tag after the <application> tag. This worked on all devices I tried except the SE Xperia X10 mini. Putting <uses-permission> first solved that one.
Also, make sure that you actually have an internet connection on your device (can you load web pages, for instance?)
You should also make sure that your application is being signed using the same keystore you used to generate your map key. If you're using eclipse to build, you'll find that keystore in the preferences, under Windows > Preferences > Android > Build.
There might be a problem on your mapView. are you trying to emulate satellite and street view?
Or your zoom level is too high.

Categories

Resources