2016-02-02 33 views
0

我有一款Android手機應用,僅限於手機。我用下面的代碼只允許手機下載從谷歌Play應用程式Google Play:華爲Nexus 6P與應用不兼容

<!-- Only permit app to be used on handsets, prevent tablets --> 
    <compatible-screens> 
     <!-- all small size screens --> 
     <screen android:screenDensity="ldpi" android:screenSize="small" /> 
     <screen android:screenDensity="mdpi" android:screenSize="small" /> 
     <screen android:screenDensity="hdpi" android:screenSize="small" /> 
     <screen android:screenDensity="xhdpi" android:screenSize="small" /> 
     <screen android:screenDensity="480" android:screenSize="small" /> 
     <!-- all normal size screens --> 
     <screen android:screenDensity="ldpi" android:screenSize="normal" /> 
     <screen android:screenDensity="mdpi" android:screenSize="normal" /> 
     <screen android:screenDensity="hdpi" android:screenSize="normal" /> 
     <screen android:screenDensity="xhdpi" android:screenSize="normal" />   
     <screen android:screenDensity="480" android:screenSize="normal" /> 
     <!-- LG G3 QHD Resolution --> 
     <screen android:screenDensity="640" android:screenSize="small" /> 
     <screen android:screenDensity="640" android:screenSize="normal" /> 
     <screen android:screenDensity="640" android:screenSize="large" /> 
     <screen android:screenDensity="640" android:screenSize="xlarge" />  
    </compatible-screens> 

今天,用戶報道,谷歌Play是告訴他們,他們的設備與應用程式相容。他們正在使用運行Android 6.0棉花糖的威瑞森無線華爲Nexus 6P。

我猜我需要添加更多到我的清單的節點來支持這個設備,但我不知道screenDensity會是什麼。我怎樣才能讓我的應用程序支持此設備?

當我在Android Studio中爲這個確切的設備創建一個模擬器時,應用程序運行起來非常好。

+0

? – Max

+0

@Anders,沒有我的targetSdk是10.這是一個應用程序已經過了一段時間,盯着android 2.3.3。我應該將targetSDK更改爲23並將minSdk設置爲10? – Phil

+0

你需要更新targetsdk爲23,它很可能會解決問題 – Max

回答

1

一下添加到屏幕尺寸

<screen 
    android:screenDensity="560" 
    android:screenSize="normal" /> 

它有望解決您的問題`build.gradle` targetsdk是23

+0

好奇,做了這項工作?這條線是否允許使用Nexus 6P? –

+0

是的,它的作品,見上面的評論:) – Max

相關問題