Johnny Johnny - 6 months ago 96
Android Question

Supported devices 0 on Google play

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

Answer

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 :)