uchman21
uchman21

Reputation: 688

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

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.

Upvotes: 0

Views: 11694

Answers (5)

Peter
Peter

Reputation: 859

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.

Upvotes: 1

uchman21
uchman21

Reputation: 688

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..

Upvotes: 4

Bhavesh Patadiya
Bhavesh Patadiya

Reputation: 25830

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

Upvotes: 0

Mahesh Kavathiya
Mahesh Kavathiya

Reputation: 573

Please try this :

  • Right click your projects and click "Android Tools"
  • Click "Add support Library" and directly add the library

Afterward run this.

Upvotes: 0

Nirav Tukadiya
Nirav Tukadiya

Reputation: 3417

try put

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

this line after all activity tags and before the end of application Tag

Upvotes: 4

Related Questions