谷歌应用商店-零支持设备

4

我知道这里有类似的问题,但是没有一个看起来很令人满意的答案。

我正在尝试发布一个应用程序,但不管我尝试什么,开发者控制台都报告说没有支持的设备。

Dev Console screenshot

这是我的完整清单;

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

    <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17"/>

     <supports-screens
        android:anyDensity="true"

        android:xlargeScreens="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:resizeable="true"   />

    <compatible-screens>

    <!-- small size screens -->
     <screen android:screenSize="small" android:screenDensity="ldpi" />
    <screen android:screenSize="small" android:screenDensity="mdpi" />
    <screen android:screenSize="small" android:screenDensity="hdpi" />
    <screen android:screenSize="small" android:screenDensity="xhdpi" />

    <!--Only hdpi and xhdpi for normal size screens -->
    <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />

    <!-- all large size screens -->
    <screen android:screenSize="large" android:screenDensity="ldpi" />
    <screen android:screenSize="large" android:screenDensity="mdpi" />
    <screen android:screenSize="large" android:screenDensity="hdpi" />
    <screen android:screenSize="large" android:screenDensity="xhdpi" />

    <!-- all xlarge size screens -->
    <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
    <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
    <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />

    <!-- Special case for Nexus 7 -->
    <screen android:screenSize="large" android:screenDensity="213" />

    </compatible-screens>        

    <uses-feature android:name="android.hardware.location" android:required="false"/>
    <uses-feature android:name="android.hardware.camera" android:required="false"/>

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-feature android:name="android.hardware.CAMERA" />
    <uses-permission android:name="android.permission.CAMERA" />

    <application
        android:icon="@drawable/blahicon"
        android:label="@string/app_name"
        android:allowBackup="false">

        <activity
            android:label="@string/app_name"
            android:name="com.blah.blahpro.Main" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:label="@string/app_name"
            android:name="com.blah.satcalcpro.Find"
            >

            <intent-filter >
                <action android:name="com.blah.lookangles.FIND" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>        


    </application>


</manifest>

非常感谢您的帮助。


你已经激活了这个apk吗? - Raghav Sood
我已经进入了旧控制台,将其停用并重新启用。它需要时间来安定下来吗?我把它留了一整夜... - sgccarey
4个回答

5
问题已解决,但不确定具体是如何解决的...我尝试删除所有兼容屏幕和支持屏幕的代码,但没有什么改变。我唯一能想到的是我删除了这一行代码;
<uses-feature android:name="android.hardware.CAMERA" />

这个本来就不应该在那里出现。现在已经支持2522个设备了,所以非常高兴。

无论如何,这是新的清单:

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="17"/>


<uses-feature android:name="android.hardware.location" android:required="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>

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

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.Light"
    android:allowBackup="false">

    <activity
        android:label="@string/app_name"
        android:name="com.blah.blahpro.Main" >
        <intent-filter >
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:label="@string/app_name"
        android:name="com.blah.blahpro.Find"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
        >

        <intent-filter >
            <action android:name="com.blah.blahactivity.FIND" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>        


</application>

对于所有遇到相同问题并使用android.hardware.camera uses-feature语句的人,你必须将其删除。这是解决0个支持设备问题的唯一方法。@sgccarey感谢您的方法。 - user872230

4

看起来uses-feature是大小写敏感的。

您在清单文件中编写了两个功能:

<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.CAMERA" />

第一个是可以的。你想使用相机,但不是必须的。
问题在于第二个需要一个android.hardware.CAMERA,而这在任何Android设备中都不存在。它们有一个camera,而不是一个CAMERA。
希望这能对你有所帮助。

1
我建议在清单文件中注释掉compatible-screens和support-screens,然后上传apk并查看结果。我预计您会发现这样可以允许更多的设备。
接下来,逐个添加这些要求,每次上传apk并查看哪些限制导致设备数量减少。一旦确定了引起问题的限制,您可以将其排除在最终版本之外。

0

我知道回答晚了,我也遇到了同样的问题。即使将所有用户功能设置为false,Play商店仍然显示零个受支持的设备。

这里是解决方案,希望能帮助到某些人。

<uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

另外

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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接