I have developed my first android app in Android Studio. I have developed a simple flashLight app. It is working well on multiple devices, but when I publish it to the playstore there is a compatibility issue. Please help me out.
Supported Android devices = 0 Devices
Mainfest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dhairya.fastflashlight">
<uses-permission android:name="android.permission.CAMERA"></uses-permission>
<uses-feature android:name="android.hardware.Camera"></uses-feature>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="720"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_flash"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name="dc.suvy.dhairya.fastflashlight.Flashlight">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Build Gradle
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "dc.suvy.dhairya.fastflashlight"
minSdkVersion 9
targetSdkVersion 9
versionCode 2
versionName '2.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'commons-io:commons-io:2.4'
}
Change
minSdkVersion 9
targetSdkVersion 9
To
minSdkVersion 9
targetSdkVersion 23
Also cross check if you really need these (just remove it if you have no good reason for keeping it):
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="720"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
Your target SDK should always be the latest SDK version you can use. So just change your Build gradle to.
minSdkVersion 9
targetSdkVersion 23
Sometimes the reason for this is a third party library that you have referenced. If you can find which one is it and if you can remove it you can solve the problem.
try removing
compile 'commons-io:commons-io:2.4'
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.