Supported devices 0 on Google play

前端 未结 5 873
别跟我提以往
别跟我提以往 2020-12-18 04:05

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 applicat

相关标签:
5条回答
  • 2020-12-18 04:42

    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.

    0 讨论(0)
  • 2020-12-18 04:43

    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

    0 讨论(0)
  • 2020-12-18 04:43

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

    0 讨论(0)
  • 2020-12-18 04:56

    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.

    0 讨论(0)
  • 2020-12-18 05:00

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

    0 讨论(0)
提交回复
热议问题