tags:

views:

125

answers:

1

Hi all,

I am currently having this in my AndroidManifest.xml

uses-library android:name="com.google.android.maps" android:required = "false"

I specified requirement of google map api is not compulsory. (This enables me to install my application on an none-google-api emulator)

However, this only works for API level 7, Platform 2.1 It doesn't work for API level 4, Platform 1.6

I am getting an error message when I am compiling - " No resource identifier found for attribute 'required" in package 'android'

But when I had looked at the documentation http://developer.android.com/guide/topics/manifest/uses-feature-element.html

attribute 'required' is introduced since level 4.

Could some body help me out!


Thanks Aillyn

I think it impossible to include required attribute in uses-library tag.

Is there a way to inlcude uses-libarary in the java code rather than in the AndroidManifest.xml??

A: 

uses-library has no required attribute. From Android docs:

<uses-library android:name="string" />

And you should use that for Google maps. From Google's docs:

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

The one that has the required attribute is uses-feature

<uses-feature android:glEsVersion="integer"
              android:name="string"
              android:required=["true" | "false"] />
Aillyn
Yes you are right, but I was able to put required attribute for Platform 2.1
TS.xy
@TS.xy You weren't supposed to.
Aillyn
Thanks Aillyn, Is there a way to inlcude uses-libarary in the java code rather than in the AndroidManifest.xml??
TS.xy
@TS.xy Not sure if that's possible
Aillyn