2

I've tried uploading many different times. I have also looked at many other SO questions regarding this same issue. Runs fine on my physical device but when uploading to google play it states that it supports 0 devices.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.slhdevelopmentf.ammobotammofinderprimetime">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ammobot_main_icon"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

    <activity
        android:name=".activities.MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".activities.SecondaryActivity"
        android:label="@string/title_activity_secondary" />
    <activity
        android:name=".activities.ShowGunbotDealActivity"
        android:label="@string/title_activity_show_gunbot_deal" />
    <activity
        android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@android:style/Theme.Translucent" />

</application>

Picture of Google Play APK overview

Here is a picture of my project directory (using android studio): Project Directory

Build.Gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.slhdevelopmentf.ammobotammofinderprimetime"
        minSdkVersion 9
        targetSdkVersion 21
        versionCode 7
        versionName "2.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            resources.srcDirs = ['src/main/resources', 'src/main/resources/raw', 'src/main/resources/lib']
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile files('src/main/resources/lib/jsoup-1.8.1 (1).jar')
    compile files('src/main/resources/lib/jsoup-1.8.1-javadoc.jar')
    compile files('src/main/resources/lib/jxl.jar')
    compile 'com.google.android.gms:play-services:6.+'
}

EDIT

So I decompiled my .apk. It is showing that the android manifest is completely blank.

EDIT_1 So I tried to add tag in manifest instead of relying on gradle. The developer console still maintains that my applications supports zero devices (works fine on test device).

I also created a new keystore and generated a signed apk. Then renamed my package and uploaded to google play developer console as a separated application named 'test', It still says that it supports zero devices.

I also installed android studio in windows then generated signed apk. It didn't work either. I did this to make sure it wasn't my configuration or OS.

Possible Hypothesis?

I started android studio as root when I first downloaded it: 'sudo ./studio.sh'. I thought it may make it more responsive. This led to the android sdk being installed as root. So now, I have to start android studio as root. Would this have any effect on generating a signed apk? Maybe the configuration/build files? I did try it on a windows box though (still didn't work) but maybe starting it as root messed up the build files of the project.

AAPT OUTPUT Version code will be different because I have tried to upload it to google play lots of times (had to change version number/code).

root@my-pc:/root/Android/Sdk/build-tools/21.1.2# /root/Android/Sdk/build-tools/21.1.2/aapt dump badging /home/horvste/Documents/PreviousCodeProjects/documents-export-2014-12-23/AmmoBot/app/build/outputs/apk/app-debug.apk

package: name='com.slhdevelopment.ammobot' versionCode='12' versionName='2.7' platformBuildVersionName='5.0.1-1624448'
sdkVersion:'9'
targetSdkVersion:'21'
uses-permission: name='android.permission.INTERNET'
uses-permission: name='android.permission.ACCESS_NETWORK_STATE'
application-label:'AmmoBot'
application-label-ca:'AmmoBot'
application-label-da:'AmmoBot'
application-label-fa:'AmmoBot'
application-label-ja:'AmmoBot'
application-label-nb:'AmmoBot'
application-label-de:'AmmoBot'
application-label-af:'AmmoBot'
application-label-bg:'AmmoBot'
application-label-th:'AmmoBot'
application-label-fi:'AmmoBot'
application-label-hi:'AmmoBot'
application-label-vi:'AmmoBot'
application-label-sk:'AmmoBot'
application-label-uk:'AmmoBot'
application-label-el:'AmmoBot'
application-label-nl:'AmmoBot'
application-label-pl:'AmmoBot'
application-label-sl:'AmmoBot'
application-label-tl:'AmmoBot'
application-label-am:'AmmoBot'
application-label-in:'AmmoBot'
application-label-ko:'AmmoBot'
application-label-ro:'AmmoBot'
application-label-ar:'AmmoBot'
application-label-fr:'AmmoBot'
application-label-hr:'AmmoBot'
application-label-sr:'AmmoBot'
application-label-tr:'AmmoBot'
application-label-cs:'AmmoBot'
application-label-es:'AmmoBot'
application-label-it:'AmmoBot'
application-label-lt:'AmmoBot'
application-label-pt:'AmmoBot'
application-label-hu:'AmmoBot'
application-label-ru:'AmmoBot'
application-label-zu:'AmmoBot'
application-label-lv:'AmmoBot'
application-label-sv:'AmmoBot'
application-label-iw:'AmmoBot'
application-label-sw:'AmmoBot'
application-label-fr-CA:'AmmoBot'
application-label-lo-LA:'AmmoBot'
application-label-en-GB:'AmmoBot'
application-label-bn-BD:'AmmoBot'
application-label-et-EE:'AmmoBot'
application-label-ka-GE:'AmmoBot'
application-label-ky-KG:'AmmoBot'
application-label-km-KH:'AmmoBot'
application-label-zh-HK:'AmmoBot'
application-label-si-LK:'AmmoBot'
application-label-mk-MK:'AmmoBot'
application-label-ur-PK:'AmmoBot'
application-label-hy-AM:'AmmoBot'
application-label-my-MM:'AmmoBot'
application-label-zh-CN:'AmmoBot'
application-label-ta-IN:'AmmoBot'
application-label-te-IN:'AmmoBot'
application-label-ml-IN:'AmmoBot'
application-label-en-IN:'AmmoBot'
application-label-kn-IN:'AmmoBot'
application-label-mr-IN:'AmmoBot'
application-label-mn-MN:'AmmoBot'
application-label-ne-NP:'AmmoBot'
application-label-pt-BR:'AmmoBot'
application-label-gl-ES:'AmmoBot'
application-label-eu-ES:'AmmoBot'
application-label-is-IS:'AmmoBot'
application-label-es-US:'AmmoBot'
application-label-pt-PT:'AmmoBot'
application-label-zh-TW:'AmmoBot'
application-label-ms-MY:'AmmoBot'
application-label-kk-KZ:'AmmoBot'
application-label-uz-UZ:'AmmoBot'
application-icon-160:'res/drawable-mdpi-v4/ammobot_main_icon.png'
application-icon-213:'res/drawable-hdpi-v4/ammobot_main_icon.png'
application-icon-240:'res/drawable-hdpi-v4/ammobot_main_icon.png'
application-icon-320:'res/drawable-xhdpi-v4/ammobot_main_icon.png'
application-icon-480:'res/drawable-xxhdpi-v4/ammobot_main_icon.png'
application-icon-640:'res/drawable-xxhdpi-v4/ammobot_main_icon.png'
application: label='AmmoBot' icon='res/drawable-mdpi-v4/ammobot_main_icon.png'
application-debuggable
launchable-activity: name='com.slhdevelopment.ammobot.activities.MainActivity'  label='AmmoBot' icon=''
feature-group: label=''
  uses-feature: name='android.hardware.touchscreen'
  uses-implied-feature: name='android.hardware.touchscreen' reason='default feature for all apps'
main
other-activities
supports-screens: 'small' 'normal' 'large' 'xlarge'
supports-any-density: 'true'
locales: '--_--' 'ca' 'da' 'fa' 'ja' 'nb' 'de' 'af' 'bg' 'th' 'fi' 'hi' 'vi' 'sk' 'uk' 'el' 'nl' 'pl' 'sl' 'tl' 'am' 'in' 'ko' 'ro' 'ar' 'fr' 'hr' 'sr' 'tr' 'cs' 'es' 'it' 'lt' 'pt' 'hu' 'ru' 'zu' 'lv' 'sv' 'iw' 'sw' 'fr-CA' 'lo-LA' 'en-GB' 'bn-BD' 'et-EE' 'ka-GE' 'ky-KG' 'km-KH' 'zh-HK' 'si-LK' 'mk-MK' 'ur-PK' 'hy-AM' 'my-MM' 'zh-CN' 'ta-IN' 'te-IN' 'ml-IN' 'en-IN' 'kn-IN' 'mr-IN' 'mn-MN' 'ne-NP' 'pt-BR' 'gl-ES' 'eu-ES' 'is-IS' 'es-US' 'pt-PT' 'zh-TW' 'ms-MY' 'kk-KZ' 'uz-UZ'
densities: '160' '213' '240' '320' '480' '640'
native-code: 'jsoup-1.8.1.jar' 'jxl.jar'
horvste
  • 636
  • 6
  • 19
  • Um... I have noticed that compared with and AndroidManifest you don't have the section where you specify the minSdkVersion however you include it in the build. Have you try to include it in the AndroidManifest (notice that is recognized by google...)? Give it a try. – Trebia Project. Jan 02 '15 at 01:46
  • @TrebiaProject. Android Studio says that the minSdkVersion will be overridden by gradle and to get rid of it. – horvste Jan 02 '15 at 02:11
  • I am not familiar with Android Studio, as I am using eclipse. The only thing I know is that the Manifest is what finally google developer will read. What I don't know is if Android Studio is changing the manifest when creating the binary you upload. If the minSdkVersion is overriden but not modified I recommend to give it a try. Actually to discover what happens I recommend to put actually a different number (10) – Trebia Project. Jan 02 '15 at 12:37
  • @TrebiaProject. I tried what you suggested. It still says that zero devices are supported. I am going to try and download eclipse and create an apk. – horvste Jan 03 '15 at 03:25
  • Try replacing jsoup-1.8.1 (1).jar with jsoup-1.8.1.jar and change the reference in the gradle file. Also, place your targetSDK and your minSDK into the manifest file and remove it from your gradle build. – Stephan Branczyk Jan 03 '15 at 07:02
  • @StephanBranczyk. Did all of your suggestions. Did not work. – horvste Jan 03 '15 at 14:56
  • By the way, this is unrelated to your present issue, but if you want to clean up the clutter of your language files and make your lint log more readable. Take a look at this StackOverflow answer http://stackoverflow.com/a/15013558/320111 (updated on August 2014) – Stephan Branczyk Jan 04 '15 at 02:34
  • Ah finally! I may have found the answer to your problem. http://stackoverflow.com/a/8212956/320111 If this turns out to be the same issue, which I think it should I hope despite that the post dates back from 2011, then we can close your question as a duplicate, and users will be redirected to that old question when they come to this one. Just let us know if this solution works for you. – Stephan Branczyk Jan 04 '15 at 03:05

3 Answers3

2

Since your screenshot shows that you're using "1 feature" and that I couldn't find any feature implied by the two particular permissions you're using, my suggestion now would be to do the following:

Testing the features required by your application

You can use the aapt tool, included in the Android SDK, to determine how Google Play will filter your application, based on its declared features and permissions. To do so, run aapt with the dump badging command. This causes aapt to parse your application's manifest and apply the same rules as used by Google Play to determine the features that your application requires.

To use the tool, follow these steps:

  1. First, build and export your application as an unsigned .apk. If you are developing in Eclipse with ADT, right-click the project and select Android Tools > Export Unsigned Application Package. Select a destination filename and path and click OK.
  2. Next, locate the aapt tool, if it is not already in your PATH. If you are using SDK Tools r8 or higher, you can find aapt in the /platform-tools/ directory.

Note: You must use the version of aapt that is provided for the latest Platform-Tools component available. If you do not have the latest Platform-Tools component, download it using the Android SDK Manager.

  1. Run aapt using this syntax:

$ aapt dump badging <path_to_exported_.apk>

Here's an example of the command output for the second Bluetooth example, above:

$ ./aapt dump badging BTExample.apk
package: name='com.example.android.btexample' versionCode='' versionName=''
uses-permission:'android.permission.BLUETOOTH_ADMIN'
uses-feature:'android.hardware.bluetooth'
sdkVersion:'3'
targetSdkVersion:'5'
application: label='BT Example' icon='res/drawable/app_bt_ex.png'
launchable activity name='com.example.android.btexample.MyActivity'label='' icon=''
uses-feature:'android.hardware.touchscreen'
main
supports-screens: 'small' 'normal' 'large'
locales: '--_--'
densities: '160'
Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
  • Added aapt output in original post as requested. I don't see any red flags. Any ideas? – horvste Jan 03 '15 at 20:45
  • @horvste, Sorry, I'm out of ideas. The only thing remaining is to start with a brand new empty Android project that can be published on Google Play, and copy things to it one by one, checking occasionally that the project can still be published to more than zero device(s). Thought, I realize you probably don't want to do that. By the way, do the "optimization tips" from the developer console tell you anything interesting? or the warnings from lint? Again, I'm totally fresh out of ideas on this one. I'm getting off this train. Good luck. – Stephan Branczyk Jan 03 '15 at 22:56
0

add below lines in manifest, I hope it works

<uses-sdk
    android:maxSdkVersion="21"
    android:minSdkVersion="8"
    android:targetSdkVersion="19" />

Note: android:maxSdkVersion, android:minSdkVersion, android:targetSdkVersion are depends on your requirements

sandeepmaaram
  • 4,191
  • 2
  • 37
  • 42
0

I had to recreate a new android project in android studio. Then copy and paste android manifest, src directory, res directory, and build directory. The application uploaded to google play stating that it supported over 7000 devices. Very annoying to have to do but this was my fix.

horvste
  • 636
  • 6
  • 19