Google 播放支持的设备 0

Supported devices 0 on Google play

我知道有人发布了类似的问题 here。 我将一个应用程序上传到 Google Play 商店,但它与所有设备都不兼容。 该应用程序实际上是一个基于 SignalR 的聊天应用程序。 看看这张图片

我附上 AndroidManifest.xml file.Any 帮助将不胜感激。

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

<supports-screens 
      android:smallScreens="true" 
      android:normalScreens="true" 
      android:largeScreens="true"
      android:xlargeScreens="true"
      android:anyDensity="true" />
<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="19" 
    android:maxSdkVersion="21" />

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission     android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

我正在使用 signalr library.I 我正在 android 中将此库用于聊天应用程序。 我首先开发了基于 eclipse 的项目并使用了 jar files.The 应用程序工作正常。

但是当我尝试将应用程序上传到 Google 时,Play.It 向我显示一条消息,表明您的应用程序不支持任何设备。 我什至尝试在没有库的情况下上传应用程序,然后它上传支持超过 6K android 设备。

由于此库已针对 gradle 针对 android.So 进行了更新,我只是将其转换为 gradle 用于 android studio 的项目作为 well.Works 完美但仍然获胜'不支持任何设备。

这些是我在 eclipse 和 android studio 中使用的 jar 文件

我终于解决了 problem.Here 已经发布了两个解决方案。

Solution 1 : using aar files

步骤 1

首先,我将我的 eclipse 项目转换为 Gradle。

步骤 2

正在从此 link 下载最新的 SignalR。生成 aar 文件。 添加这些文件作为依赖项。

步骤 3

更新了我的清单 file.I 缺少位置支持的一些权限。 现在这是新的 AndroidManifest.xml

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

<uses-feature
    android:name="android.permission.INTERNET"
    android:required="false" />
<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="19"
    android:maxSdkVersion="21" />

<supports-screens
    android:anyDensity="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>


<permission android:name="com.test.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-permission android:name="com.test.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

当然还有应用标签和活动。

Solution 2: using jar files

步骤 1

在主包中创建一个名为 "libs" 的目录并粘贴所有 jar files.You 可以从此 link

下载 jar 文件

步骤 2

在 main package/app 的 build.gradle 中添加依赖

步骤 3

现在这是我项目的主要 build.gradle 的样子。

步骤 4

这就是我的 settings.gradle 的样子

步骤 5

完成所有这些步骤后,您仍然需要导入 errors.So 使缓存无效并重新启动

Final Output on Google Play

现在它支持超过 7000 台设备

干杯:)

我们取得了一些成功,能够成功地将 SignalR 集成到我们的 Android 应用程序中,并且拥有一个可以在多个设备上正常运行的 APK。但是,每当我们尝试将我们的 APK 上传到 Play 商店时,它总是报告 0 个支持设备。

如果我们删除 SignalR Java/Android Cient .JAR 文件,这个数字会再次 returns。

通过与 Google Play 支持的讨论,我们获得了以下见解:

Thanks for your patience. My tools have confirmed that the issue is being caused by the following which are declared as native platforms: getLibs.ps1, getLibs.sh, gson-2.2.2.jar

While we are able to determine the permission or feature that is causing a compatibility conflict, we are unable to provide technical development support to explain why the conflict is occurring, or how to resolve the conflict. I'm sorry we can't provide a specific resolution.

The issue is definitely caused by using the libraries as native platforms.

只有部分答案,但只想与面临此问题的其他人分享

一旦我们使用 .AAR 文件,我们就能够让 APK 生成,但是 SignalR 连接不再有效。请注意@Jhonny 是如何设法让它工作的,但我们只能生成一个 .AAR 文件(对于 android),但通用 java 模块不会编译成 .AAR。

默认情况下,任何 android 特征都有 android:required="true"。因此,当您将 apk 上传到 Google Play 时,机器人会看到 android:required="true"。它假定除非该功能可用,否则您的应用程序将无法运行。因此,您得到这个“支持 0 个设备”。

只需使 android:required="false" 即可解决问题。

我通过修复冲突的 jar 文件解决了这个问题。我将它们发布在 github 上。 https://github.com/eak65/FixedSignalRJar

上周我遇到了同样的情况。

我发现主要问题是 "signalr-client-sdk.jar" 的包装不正确 android。

folder inside the "signalr-client-sdk.jar"

signalr-client-sdk.jar
|
|-lib
|  |
|  |-getLibs.ps1
|  |-getLibs.sh
|  |-gson-2.2.2.jar

这三个文件将被打包到apk "lib"文件夹中。 当您的应用程序使用 armeabi、x86、x86_64 原生支持库 (*.so) 时,它会正常工作,但使用 none 时会出错。并使 google 开发人员控制台 Web 过滤限定符支持设备错误。

put this code to fix the problem

packagingOptions {
  exclude 'lib/getLibs.ps1'
  exclude 'lib/getLibs.sh'
  exclude 'lib/gson-2.2.2.jar'
}

希望对您有所帮助