Google Play 开发者控制台:支持 Android 设备:0

Google Play Developer Console: Supported Android Devices: 0

我试过多次上传。我还查看了关于同一问题的许多其他 SO 问题。在我的物理设备上运行良好,但当上传到 google 播放时,它表示它支持 0 台设备。

<?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>

这是我的项目目录的图片(使用 android studio):

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.+'
}

编辑

所以我反编译了我的 .apk。它表明 android 清单完全空白。

EDIT_1 所以我尝试在清单中添加标签而不是依赖 gradle。开发人员控制台仍然保持我的应用程序支持零设备(在测试设备上工作正常)。

我还创建了一个新的密钥库并生成了一个签名的 apk。然后重命名我的包并上传到 google play developer console 作为一个名为 'test' 的单独应用程序,它仍然说它支持零设备。

我还在 windows 中安装了 android 工作室,然后生成了签名的 apk。它也没有用。我这样做是为了确保它不是我的配置或 OS.

可能的假设?

我第一次下载时以 root 身份启动 android studio:'sudo ./studio.sh'。我认为这可能会使它更具响应性。这导致 android sdk 被安装为 root。所以现在,我必须以 root 身份启动 android studio。这会对生成签名的 apk 有什么影响吗?也许 configuration/build 文件?我确实在 windows 盒子上尝试过(仍然没有用)但也许以 root 身份启动它搞砸了项目的构建文件。

AAPT 输出 版本代码会有所不同,因为我尝试将其上传到 google 玩了很多次(不得不更改版本 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'

在清单中添加以下行,希望它有效

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

注意: android:maxSdkVersion,android:minSdkVersion,android:targetSdkVersion取决于你的要求

由于您的屏幕截图显示您正在使用“1 个功能”,而我找不到任何 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.

注意: 您必须使用为可用的最新平台工具组件提供的 aapt 版本。如果您没有最新的 Platform-Tools 组件,请使用 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'

我不得不在 android 工作室中重新创建一个新的 android 项目。然后复制粘贴androidmanifest、src目录、res目录、build目录。上传到 google 的应用程序声称它支持超过 7000 台设备。不得不这样做很烦人,但这是我的解决办法。