Supported devices 0 on Google play

萝らか妹 提交于 2019-12-18 04:57:12

问题


I know similar question is posted here. I uploaded an app to Google Play Store but it is incompatible with all the devices. The app is actually a SignalR based chat application. Check out this image

I am attaching the AndroidManifest.xml file.Any help would be appreciated.

<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"/>

I am using signalr library.I am using this library for a chat app in android. I firstly developed eclipse based project and use the jar files.The app is working fine.

But when i try to upload the app to the Google Play.It shows me a message that your app doesn't supports any devices. I even tried to upload the app without the libraries then it gets uploaded supports over 6K android devices.

As this library is updated for gradle for android.So i simply convert it into gradle project for android studio as well.Works perfectly but still won't supports any devices.

These are the jar files i am using in eclipse and android studio


回答1:


I had faced same situation last week.

And I found the main problem is the "signalr-client-sdk.jar" was packed not correct for android.

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

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

These three file will be pack into apk "lib" folder. It will work fine when your app with armeabi,x86,x86_64 native supprot library(*.so), but wrong with none. And make google developer console web to filter qualifier support device wrong.

put this code to fix the problem

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

Hope this helps




回答2:


I solved this issue by fixing the conflicting jar files. I posted them on github. https://github.com/eak65/FixedSignalRJar




回答3:


Finally i solved the problem.Here two solutions have been posted.

Solution 1 : using aar files

Step 1

First i convert my eclipse project into Gradle.

Step 2

Downloading latest SignalR from this link.Generate the aar files. Add these files as dependencies.

Step 3

Updated my Manifest file.I missed some permissions for location support. Now this is the new 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" />

Ofcourse it have application tag and activities as well.

Solution 2: using jar files

Step 1

Create a directory named "libs" inside your main package and paste all the jar files.You can download jar files from this link

Step 2

Add dependencies in build.gradle of main package/app

Step 3

Now this how my project's main build.gradle looks like.

Step 4

This is how my settings.gradle looks like

Step 5

After doing all these steps you still have import errors.So invalidate cache and restart

Final Output on Google Play

Now it supports over 7K devices

Cheers :)




回答4:


We've had some success and been able to successfully integrate SignalR into our Android application and have an APK that operates correctly across multiple devices. However, whenever we attempt to upload our APK to the Play Store it always reports 0 Support Devices.

This number returns again if we remove the SignalR Java/Android Cient .JAR Files.

Through discussion with Google Play Support, we were able to get the following insight:

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.

Only a partial answer, but just want to share for anyone else that is facing this issue

We have been able to get the APK to generate once we use .AAR file, but then the SignalR Connection no longer works. Note sure how @Jhonny managed to get this working, but we have only been able to generate the one .AAR file (for android), but the general java module doesn't compile into .AAR.




回答5:


As default, any android feature has android:required="true". Hence, when you upload apk to Google Play, bots see android:required="true". It assumes that your app won't work unless that feature is available. Hence, you get this "0 devices supported".

Simply making android:required="false" solves the problem.



来源:https://stackoverflow.com/questions/29565203/supported-devices-0-on-google-play

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!