6

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 enter image description here

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 enter image description here

Community
  • 1
  • 1
Talha Q
  • 4,350
  • 4
  • 28
  • 40
  • can you show me the jar you use? – ligi Apr 14 '15 at 12:22
  • I have added the screen shot of jar files i am using.Thanks – Talha Q Apr 14 '15 at 12:26
  • Hm a screenshot is not really helping. Please look into the jar - I had it once that a lib contained 64bit native code - and then I had exactly the same behavior - I could execute on device - but play filtered to 0 devices – ligi Apr 14 '15 at 12:31
  • Can you please look.I have uploaded jar files.https://www.dropbox.com/sh/xjwl4jfc5rjaasi/AABFzzeJaH_ymea1j9lmtJFya?dl=0 – Talha Q Apr 14 '15 at 12:36
  • or atleast elaborate the whole process how you overcome this bug – Talha Q Apr 14 '15 at 12:38
  • http://stackoverflow.com/questions/22730620/bad-apk-when-using-bitcoinj-from-maven-central Dropbox wants me to register for downloading the file - I do not want dropbox – ligi Apr 14 '15 at 15:19
  • Download jars from drive.you can even upload items here.https://drive.google.com/folderview?id=0B1pqesu2pQQ3fmNuVWIzSW13eHpTeHRTdEp6SHZYa0ZPYjZnYnBfd1JqVEI0QWRQa1Nqc1k&usp=sharing – Talha Q Apr 14 '15 at 15:48
  • you seem to have another problem - can you show the output of aapt d badging – ligi Apr 14 '15 at 16:00
  • image added in drive – Talha Q Apr 14 '15 at 16:09
  • hm this looks good - sorry then I have no more idea what this could be :-( – ligi Apr 14 '15 at 17:16
  • any solution that you might think will solve the problem.Thanks for the help so far. :) – Talha Q Apr 14 '15 at 18:23

5 Answers5

10

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

kai
  • 101
  • 1
  • 5
9

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

EK_AllDay
  • 1,095
  • 2
  • 15
  • 35
  • Thanks for this Ethan. Had the exact same issue with my app and this fixed the issue. But can you please elaborate on what you exactly changed in these jars ? – Knarf Oct 22 '15 at 07:12
  • @Knarf this error occurs because of conflicts with the gson dependencies. I resolved the conflicts. – EK_AllDay Apr 03 '16 at 20:38
5

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

enter image description here

Step 2

Add dependencies in build.gradle of main package/app enter image description here

Step 3

Now this how my project's main build.gradle looks like. enter image description here

Step 4

This is how my settings.gradle looks like

enter image description here

Step 5

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

enter image description here

Final Output on Google Play

Now it supports over 7K devices

enter image description here

Cheers :)

Talha Q
  • 4,350
  • 4
  • 28
  • 40
  • I followed these exact steps for solution number 2 and i am still having issues :( – EK_AllDay Jul 06 '15 at 06:23
  • 1
    please add a separate questions with the manifest file i will try to figure out the problem.Are you using signal r library ? – Talha Q Jul 06 '15 at 17:52
0

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.

  • You can download .AAR files from here https://app.box.com/s/k2m05ig0eg1qjey4ps6028ymtbdiijdc – Talha Q Apr 25 '15 at 08:33
  • Check this this link too.https://stackoverflow.com/questions/29611139/steps-to-get-signalr-working-in-android-studio/29628335#29628335 – Talha Q Apr 25 '15 at 08:35
  • @Johnny , Really appreciate your comment/response to this. This issue has been very challenging to get any insight on...! However, we had been able to compile the AAR for the one (signalr-client-sdk-android), but were unable to compile the AAR file for the other needed piece (signalr-client-sdk). Do you have these other file, or were you able to get it working with just the one file? – SteelCityRKP2012 Apr 26 '15 at 06:50
  • I have added another solution for you follow the solution 2.Your problem will be solved.Added for you @SteelCityRKP2012..My app is available now in Google play by using solution 2 – Talha Q Apr 26 '15 at 10:47
  • Thank you @Johnny, this is very helpful and provides clarity regarding this issue. We've just had some success with compiling the JARs themselves within Gradle; however, we're still testing through. This very helpful to see; much appreciated...! – SteelCityRKP2012 Apr 27 '15 at 07:05
  • SteelCity if you still have issues see my answer. – EK_AllDay Jul 14 '15 at 04:41
0

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.

Sujit Devkar
  • 1,195
  • 3
  • 12
  • 22