uses-library in AndroidManifest.xml

后端 未结 2 1899
逝去的感伤
逝去的感伤 2021-01-28 22:14

I currently have this in my AndroidManifest.xml

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

The specified

相关标签:
2条回答
  • 2021-01-28 22:44

    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"] />
    
    0 讨论(0)
  • 2021-01-28 22:45

    Looks like Android doc got updated:

    attributes:

    android:required
        Boolean value that indicates whether the application requires the library specified by android:name:
    
            "true": The application does not function without this library. The system will not allow the application on a device that does not have the library.
            "false": The application can use the library if present, but is designed to function without it if necessary. The system will allow the application to be installed, even if the library is not present. If you use "false", you are responsible for checking at runtime that the library is available.
    
            To check for a library, you can use reflection to determine if a particular class is available.
    
        The default is "true".
    
        Introduced in: API Level 7.
    

    http://developer.android.com/guide/topics/manifest/uses-library-element.html

    0 讨论(0)
提交回复
热议问题