为什么我在 google playstore 上的支持设备列表是空的
Why is my list of supported devices empty on google playstore
更新
所以为了解决这个问题,我采取了开始一个新项目的方法,一点一点地尝试把它带到最终的项目中。以下片段似乎至少部分负责
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera2.autofocus"/>
在我添加该代码段之前,该列表有 9202 台设备,在我添加该代码段之后,该列表下降到 0.
原始问题
我过去使用 Eclipse 发布过很多应用程序。这是我第一次发布使用 android studio 开发的应用程序。由于我的应用程序在移动应用商店中不可见(即通过 android)并且在网上商店中显示 This app is incompatible with all of your devices.
,因此我开始调查以找出原因。令我惊喜的是,我发现这是我的 Supported devices list
这太疯狂了,因为我以前从未考虑过这一点。任何想法我可能做错了什么?使用 adb
工具将我的发布 apk 上传到我的设备没有问题。我的 gradle 确实说
defaultConfig {
applicationId "com.company.android"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "0.0.06"
multiDexEnabled true
}
经过多次故障排除后,我现在甚至已将其添加到我的清单中
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="23"/>
这是我的完整 gradle 文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.mycompany.android"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "0.0.06"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
preDexLibraries = false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':cloud', configuration: 'android-endpoints')
compile('com.twitter.sdk.android:twitter:1.9.0@aar') {
transitive = true;
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.path:android-priority-jobqueue:1.1.2'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true;
}
}
而且我已经检查过 apk 已激活。
清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="com.company.android"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
<!-- for notifications -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.company.android.permission.C2D_MESSAGE"/>
<!-- Additional permission for camera -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera2.autofocus"/>
<application
android:name=".Application"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<!-- ACTIVITIES -->
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
</intent-filter>
<!-- deep linking for search engine -->
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com” -->
<data
android:host="www.company.com"
android:scheme="http"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com/” -->
<data
android:host="www.company.com"
android:pathPrefix="/"
android:scheme="http"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "https://www.company.com” -->
<data
android:host="www.company.com"
android:scheme="https"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com/” -->
<data
android:host="www.company.com"
android:pathPrefix="/"
android:scheme="https"/>
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
<activity
android:name=".CameraActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_camera"/>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"/>
<activity
android:name=".DogsWebPageActivity"
android:label="@string/title_activity_Dogs_web_page"
android:theme="@style/AppTheme">
<!--<meta-data-->
<!--android:name="android.support.PARENT_ACTIVITY"-->
<!--android:value=".MainActivity"/>-->
</activity>
<!-- RECEIVERS -->
<!-- for cloud messages -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.company.android"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="com.company.android"/>
</intent-filter>
</receiver>
<!-- fragments for their adapters -->
<!-- SERVICES -->
<!-- for cloud messages -->
<service
android:name="com.company.android.data.service.companyGcmListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
</intent-filter>
</service>
<service
android:name=".data.service.companyInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<service
android:name=".data.service.RegistrationIntentService"
android:exported="false">
</service>
<!-- The DuckSyncAdapter service -->
<service
android:name=".data.contentprovider.sync.DuckSyncService"
android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter"/>
</service>
<!-- syncadapter's dummy authenticator service -->
<service android:name=".data.contentprovider.sync.DuckAuthenticatorService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator"/>
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator"/>
</service>
<!-- for adapters: data cache/providers -->
<service
android:name=".data.service.DogsService"
android:exported="false"/>
<service
android:name=".data.service.RemoteDataService"
android:exported="false"/>
<service
android:name=".data.service.VideoSearchService"
android:exported="false"/>
<!-- PROVIDERS -->
<!-- Duck tab content provider -->
<provider
android:name=".data.contentprovider.VideoProvider"
android:authorities="@string/content_authority"
android:exported="false"
android:syncable="true"/>
<provider
android:name=".data.contentprovider.companySearchRecentSuggestionsProvider"
android:authorities="com.company.android.data.contentprovider.companySearchRecentSuggestionsProvider"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="somestring"/>
</application>
</manifest>
没有android.hardware.camera2.autofocus
,至少the docs for <uses-feature>
里没有。 是 android.hardware.camera.autofocus
(没有2
)。除非你在某处看到你的 <uses-feature>
记录,请尝试切换到没有 2
的那个,看看你是否有更好的运气。
更新
所以为了解决这个问题,我采取了开始一个新项目的方法,一点一点地尝试把它带到最终的项目中。以下片段似乎至少部分负责
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera2.autofocus"/>
在我添加该代码段之前,该列表有 9202 台设备,在我添加该代码段之后,该列表下降到 0.
原始问题
我过去使用 Eclipse 发布过很多应用程序。这是我第一次发布使用 android studio 开发的应用程序。由于我的应用程序在移动应用商店中不可见(即通过 android)并且在网上商店中显示 This app is incompatible with all of your devices.
,因此我开始调查以找出原因。令我惊喜的是,我发现这是我的 Supported devices list
这太疯狂了,因为我以前从未考虑过这一点。任何想法我可能做错了什么?使用 adb
工具将我的发布 apk 上传到我的设备没有问题。我的 gradle 确实说
defaultConfig {
applicationId "com.company.android"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "0.0.06"
multiDexEnabled true
}
经过多次故障排除后,我现在甚至已将其添加到我的清单中
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="23"/>
这是我的完整 gradle 文件:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.mycompany.android"
minSdkVersion 14
targetSdkVersion 23
versionCode 6
versionName "0.0.06"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
dexOptions {
incremental true
javaMaxHeapSize "4g"
preDexLibraries = false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(path: ':cloud', configuration: 'android-endpoints')
compile('com.twitter.sdk.android:twitter:1.9.0@aar') {
transitive = true;
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.path:android-priority-jobqueue:1.1.2'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.5.2@aar') {
transitive = true;
}
}
而且我已经检查过 apk 已激活。
清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="com.company.android"
xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"/>
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/>
<!-- for notifications -->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="com.company.android.permission.C2D_MESSAGE"/>
<!-- Additional permission for camera -->
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera2.autofocus"/>
<application
android:name=".Application"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<!-- ACTIVITIES -->
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|screenLayout|uiMode|screenSize|smallestScreenSize"
android:label="@string/app_name"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH"/>
</intent-filter>
<!-- deep linking for search engine -->
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com” -->
<data
android:host="www.company.com"
android:scheme="http"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com/” -->
<data
android:host="www.company.com"
android:pathPrefix="/"
android:scheme="http"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "https://www.company.com” -->
<data
android:host="www.company.com"
android:scheme="https"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<!-- Accepts URIs that begin with "http://www.company.com/” -->
<data
android:host="www.company.com"
android:pathPrefix="/"
android:scheme="https"/>
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable"/>
</activity>
<activity
android:name=".CameraActivity"
android:configChanges="orientation|screenSize"
android:label="@string/title_activity_camera"/>
<activity
android:name=".SettingsActivity"
android:label="@string/title_activity_settings"/>
<activity
android:name=".DogsWebPageActivity"
android:label="@string/title_activity_Dogs_web_page"
android:theme="@style/AppTheme">
<!--<meta-data-->
<!--android:name="android.support.PARENT_ACTIVITY"-->
<!--android:value=".MainActivity"/>-->
</activity>
<!-- RECEIVERS -->
<!-- for cloud messages -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.company.android"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="com.company.android"/>
</intent-filter>
</receiver>
<!-- fragments for their adapters -->
<!-- SERVICES -->
<!-- for cloud messages -->
<service
android:name="com.company.android.data.service.companyGcmListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
</intent-filter>
</service>
<service
android:name=".data.service.companyInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<service
android:name=".data.service.RegistrationIntentService"
android:exported="false">
</service>
<!-- The DuckSyncAdapter service -->
<service
android:name=".data.contentprovider.sync.DuckSyncService"
android:exported="true">
<intent-filter>
<action android:name="android.content.SyncAdapter"/>
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter"/>
</service>
<!-- syncadapter's dummy authenticator service -->
<service android:name=".data.contentprovider.sync.DuckAuthenticatorService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator"/>
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator"/>
</service>
<!-- for adapters: data cache/providers -->
<service
android:name=".data.service.DogsService"
android:exported="false"/>
<service
android:name=".data.service.RemoteDataService"
android:exported="false"/>
<service
android:name=".data.service.VideoSearchService"
android:exported="false"/>
<!-- PROVIDERS -->
<!-- Duck tab content provider -->
<provider
android:name=".data.contentprovider.VideoProvider"
android:authorities="@string/content_authority"
android:exported="false"
android:syncable="true"/>
<provider
android:name=".data.contentprovider.companySearchRecentSuggestionsProvider"
android:authorities="com.company.android.data.contentprovider.companySearchRecentSuggestionsProvider"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<meta-data
android:name="io.fabric.ApiKey"
android:value="somestring"/>
</application>
</manifest>
没有android.hardware.camera2.autofocus
,至少the docs for <uses-feature>
里没有。 是 android.hardware.camera.autofocus
(没有2
)。除非你在某处看到你的 <uses-feature>
记录,请尝试切换到没有 2
的那个,看看你是否有更好的运气。