发布我的第一个Android应用程序在PlayStore上支持Android设备0
我在Android Studio中开发了我的第一个Android应用程序。我开发了一个简单的FlashLight应用程序。它在多个设备上运行良好,但是当我将它发布到playstore时存在兼容性问题。请帮助我。发布我的第一个Android应用程序在PlayStore上支持Android设备0
支持的Android设备= 0设备
Mainfest.xml文件
<?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>
构建摇篮
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'
}
变化
minSdkVersion 9
targetSdkVersion 9
要
minSdkVersion 9
targetSdkVersion 23
而且交叉检查,如果你真的需要这些(只是删除它,如果你没有很好的理由保持它):
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="720"
android:resizeable="true"
android:smallScreens="true"
android:xlargeScreens="true" />
我已经尝试过,但它仍然显示Suported Devices 0?请帮助@AndroidMechanic –
清理并重新生成已签名的apk。你是否做了我提出的改变? – AndroidMechanic
是的,我已经做了两个变化@AndroidMechanic'机器人{ compileSdkVersion 23 buildToolsVersion “24.0.0” defaultConfig { 的applicationID “dc.suvy.dhairya.fastflashlight” 的minSdkVersion 9 targetSdkVersion 23 的versionCode 2 的versionName '2.0' }' –
你目标SDK应始终是您可以使用的最新SDK版本。所以,只需将您的Build gradle更改为。
minSdkVersion 9
targetSdkVersion 23
我已经改变,但没有变化仍然支持的设备0'机器人{ compileSdkVersion 23 buildToolsVersion “24.0.0” defaultConfig { 的applicationID“ dc.suvy.dhairya.fastflashlight“ minSdkVersion 9 targetSdkVersion 23 versionCode 2 versionName'2.0' }'@Ken Ratanachai S. –
有时候这样做的原因是你引用的第三方库。如果你可以找到它是哪一个,如果你可以删除它,你可以解决这个问题。
尝试删除
compile 'commons-io:commons-io:2.4'
您targetSdkVersion为9。我认为这是主要的问题。 –
我该如何修复它,我应该做到23?@KrupalShah –