Uploaded APK to Play Store, got 0 supported devices but no error

I am trying to publish an Alpha version of my app to the Play Store, but I am getting 0 supported devices and it is frustrating as I don't see the bug.

The project is a new style (gradle) and the API declaration and versions are defined in the build.gradle.

You can get the app here https://github.com/Coinomi/coinomi-android

Here is my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.coinomi.wallet"
    android:installLocation="internalOnly" >

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.NFC" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.BLUETOOTH" />

    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.nfc"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.front"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.camera.flash"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.screen.landscape"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.bluetooth"
        android:required="false" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:name=".WalletApplication"
        android:allowBackup="false"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".ui.WalletActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".ui.IntroActivity"
            android:theme="@style/NoTitleBar"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize" >
        </activity>

        <activity
            android:name=".ui.ScanActivity"
            android:configChanges="orientation|keyboard|keyboardHidden"
            android:theme="@style/NoTitleBar"
            android:screenOrientation="landscape"
            android:stateNotNeeded="true"
            android:windowSoftInputMode="stateAlwaysHidden" />

        <service
            android:name=".service.CoinServiceImpl"
            android:exported="false" />

    </application>

</manifest>

I you have an idea please help because I am stuck from yesterday.

Thanks!

Finally it was a dependency compile 'com.lambdaworks:scrypt:1.4.0' that was causing the issue.

If you stumble upon this issue, check if in the APK DETAILS dialog in Google Play if you have:

Native platforms x86_64

This was, I think, the problem because when I removed the dependency, the x86_64 part was removed and got 6814 supported devices.

UPDATE

The root of the problem was that the dependency had native precompiled .so libraries but none for Android. I had to recompile with NDK from source for the platforms: armeabi-v7a and armeabi

the error message is telling it all. you need to use a package name of your own. the package name is the identitiy of the application.

to rename the package name, in eclipse right click on the project in project explorer. then android tools > rename aplication package name. then enter the new package name.

also make sure that you are trying to upload a release build

it looks to be a display issue: if you check the device catalog, supported devices are displayed properly, and once rollout takes place, the "i" icon next to the apk also shows the correct figure.

google has confirmed the issue in chat, so i'm positive a fix is in the pipe.

my application has the same problem. i guess this is because the minsdkversion is 4, i.e. android 1.6. from the <uses-feature> documentation:

in general, if your application is designed to run on android 1.6 and earlier versions, the android:required attribute is not available in the api and android market assumes that any and all declarations are required.

this makes sense because when you declare a feature as optional, you are supposed to use the hassystemfeature() method from the packagemanager to check whether the current device has that particular feature. however, this method itself is available only from api level 5!

thanks to a tip on google+, it appears i found the solution. in the build.gradle file, the values for minsdkversion and targetsdkversion can be overridden. i'm assuming that this file is generated based on the manifest, and there's a bug in android studio that was putting incorrect values here. this is only an assumption.

the following images show what the build.gradle file was like before i altered it, what it looked like after i altered it, and what the developer console shows for this new apk after i uploaded it.


Tags: Android Android Manifest Google Play