When I upload my app on playstore, google playstore give me "Zero devices supported".
I have followed all guidelines of android developer before uploading app. I want publish my app only for phone.
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.schoolgame"
android:versionCode="22"
android:versionName="3.1">
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="16"
android:targetSdkVersion="21"
/>
<compatible-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" />
<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" />
</compatible-screens>
<application
android:allowBackup="true"
android:icon="@drawable/logo"
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Light.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".EnglishHomeActivity"
android:label="Home"
android:theme="@style/SchoolGameTheme" >
</activity>
<activity
android:name=".RegisterActivity"
android:label="Sign up"
android:theme="@style/SchoolGameTheme" >
</activity>
<activity
android:name=".SendInfoActivity"
android:label="@string/title_activity_send_info"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name=".ItalianHomeActivity"
android:label="Home"
android:theme="@style/SchoolGameTheme" >
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_login"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<activity
android:name=".UpdateEmailActivity"
android:label="@string/title_activity_update_email"
android:theme="@style/SchoolGameTheme" >
</activity>
<activity
android:name=".UpdateInfoActivity"
android:label="@string/title_activity_update_info"
android:theme="@style/SchoolGameTheme" >
</activity>
<activity
android:name=".UpdatePasswordActivity"
android:label="@string/title_activity_update_password"
android:theme="@style/SchoolGameTheme" >
</activity>
</application>
</manifest>
build.gradle:
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'org.apache.httpcomponents:httpcore:4.3.3'
compile ('org.apache.httpcomponents:httpmime:4.4.1'){
exclude module: 'httpclient'
}
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.schoolgame"
minSdkVersion 16
targetSdkVersion 21
versionCode 22
versionName "3.1"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
buildTypes {
release {
minifyEnabled false
}
}
}
Do not use <compatible-screens>
tag as adviced in developer_guide
instead use tag. For example:
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
Since you don't want to support tablets you should exclude android:xlargeScreens="true"
For more information on visit developer_support_screen_guide
In my case it was the common-codecs dependency.
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
The APK executed fine during internal testing but when published to Playstore , it was showing common-codecs as as a native library and the supported devices to be zero.
The fix was including a local .jar for it in the libs folder and compile using:
compile fileTree(dir: 'libs', include: '*.jar')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.