2016-07-05 45 views
1

我在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' 
} 
+0

您targetSdkVersion爲9。我認爲這是主要的問題。 –

+0

我該如何修復它,我應該做到23?@KrupalShah –

回答

0

變化

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" /> 
+0

我已經嘗試過,但它仍然顯示Suported Devices 0?請幫助@AndroidMechanic –

+1

清理並重新生成已簽名的apk。你是否做了我提出的改變? – AndroidMechanic

+0

是的,我已經做了兩個變化@AndroidMechanic'機器人{ compileSdkVersion 23 buildToolsVersion 「24.0.0」 defaultConfig { 的applicationID 「dc.suvy.dhairya.fastflashlight」 的minSdkVersion 9 targetSdkVersion 23 的versionCode 2 的versionName '2.0' }' –

0

目標SDK應始終是您可以使用的最新SDK版本。所以,只需將您的Build gradle更改爲。

minSdkVersion 9 
    targetSdkVersion 23 
+0

我已經改變,但沒有變化仍然支持的設備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. –

0

有時候這樣做的原因是你引用的第三方庫。如果你可以找到它是哪一個,如果你可以刪除它,你可以解決這個問題。

嘗試刪除

compile 'commons-io:commons-io:2.4' 
+0

不,它不起作用 –

+0

@DhairyaChandra嘗試編輯一個 – Nisarg

+0

沒有它沒有工作 –

相關問題