【问题标题】:Nexus 7 Support for Android Application Manifest AssemblyNexus 7 支持 Android 应用程序清单组件
【发布时间】:2012-08-17 17:29:04
【问题描述】:

我有一个 Android 应用程序,其中包含下面列出的 AndroidManifest.xml。上传到 Google Play 后,Nexus 7 被列为不支持的设备,我试图找出原因。当然,Google Play 不会告诉您清单的原因或哪些权限或使用限制它不受支持。关于以下代码的哪一部分导致 Nexus 7 被列为不受支持的任何想法?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.xxxx.xxxx.applet"
    android:versionCode="x"
    android:versionName="x.x" >

    <uses-sdk
        android:minSdkVersion="12"
        android:targetSdkVersion="14" />

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="false"
        android:xlargeScreens="true" >
    </supports-screens>

    <application
        android:name="com.xxxx.xxxx.xxxx.xxxx"
        android:hardwareAccelerated="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:logo="@drawable/ic_launcher"
        android:theme="@android:style/Theme.Holo" >

        <activity
            android:name="MainActivity"
            android:configChanges="keyboardHidden|orientation"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:launchMode="singleTop" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>

            <meta-data
                android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
                android:resource="@xml/device_list" />
        </activity>
</manifest>

【问题讨论】:

    标签: android manifest google-play nexus-7


    【解决方案1】:

    这个:

    <uses-permission android:name="android.permission.CAMERA" />
    

    这让很多人感到惊讶,因为 Nexus 7 确实有一个前置摄像头,但它似乎不计入此特定许可的目的。

    【讨论】:

    • 要克服这个问题,请添加&lt;uses-feature android:name="android.hardware.camera" android:required="false"/&gt;。见developer.android.com/guide/topics/manifest/…android-developers.blogspot.com/2012/07/…
    • 成功!!谢谢你。此外,Google Play 现在还显示了 40 多个可用设备。如果我能在另一个帖子中找到这个,请道歉,但感谢您的快速和正确的回复
    • @CommonsWare 当我尝试在 Nexus 7 显示对话框中运行此 github.com/pplante/zxing-android 时,“抱歉,android 相机遇到问题,您可能需要重新启动设备!”但在尝试使用&lt;uses-feature android:name="android.hardware.camera" android:required="false"/&gt; 的手机上运行良好,但没有工作!
    • @Subra:这与这个问题(与 Play 商店列表相关)无关,并且您已经提交了与崩溃相关的项目问题:github.com/pplante/zxing-android/issues/2
    • @user1607521 我很好奇这些是哪些设备 - 但我猜 Google Play 也不会以方便的方式告诉你...
    猜你喜欢
    • 2013-01-18
    • 1970-01-01
    • 1970-01-01
    • 2013-01-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-29
    • 2014-01-27
    相关资源
    最近更新 更多