2016-04-22 146 views
0

我在Google Play上发布了一个应用程序,该应用程序的最低API级别为17(Android 4.2)。 我有一台运行Android 4.4.2的测试手机。 该应用程序目前只发布为测试版。当我尝试下载它时,它说它不兼容。Google Play兼容性问题

有没有人有任何想法可能会导致此?

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 
useLibrary 'org.apache.http.legacy' 

defaultConfig { 
    applicationId "com.delaneybiometrics.delaneymobile" 
    minSdkVersion 17 
    targetSdkVersion 23 
    versionCode 9 
    versionName "0.9" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.3.0' 
compile 'com.android.support:design:23.3.0' 
compile 'com.google.android.gms:play-services:8.4.0' 
compile 'org.apache.httpcomponents:httpcore:4.4.3' 
compile 'org.apache.httpcomponents:httpclient:4.5' 

}

这里是清单......

<?xml version="1.0" encoding="utf-8"?> 

<!-- 
    The ACCESS_COARSE/FINE_LOCATION permissions are not required to use 
    Google Maps Android API v2, but you must specify either coarse or fine 
    location permissions for the 'MyLocation' functionality. 
--> 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
<uses-permission android:name="android.permission.CAMERA" /> 
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<!--<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>--> 

<uses-feature 
    android:name="android.hardware.camera" 
    android:required="false" /> 
<uses-feature 
    android:name="android.hardware.camera.front" 
    android:required="false" /> 
<uses-feature android:name="android.hardware.camera.autofocus" /> 

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

<application 
    android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme"> 
    <activity 
     android:name=".MainActivity" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" 
     android:theme="@style/AppTheme.NoActionBar" 
     android:windowSoftInputMode="adjustResize"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

     </intent-filter> 
    </activity> 
    <!-- 
     The API key for Google Maps-based APIs is defined as a string resource. 
     (See the file "res/values/google_maps_api.xml"). 
     Note that the API key is linked to the encryption key used to sign the APK. 
     You need a different API key for each encryption key, including the release key that is used to 
     sign the APK for publishing. 
     You can define the keys for the debug and release targets in src/debug/ and src/release/. 
    --> 
    <meta-data 
     android:name="com.google.android.geo.API_KEY" 
     android:value="@string/google_maps_key" /> 

    <activity 
     android:name=".PunchActivity" 
     android:screenOrientation="portrait" 
     android:theme="@style/AppTheme.NoActionBar" /> 
    <activity 
     android:name=".OnSiteActivity" 
     android:screenOrientation="portrait" 
     android:theme="@style/AppTheme.NoActionBar" /> 
    <activity 
     android:name=".RegisterActivity" 
     android:screenOrientation="portrait" 
     android:theme="@style/AppTheme.NoActionBar" /> 
    <activity 
     android:name=".TourActivity" 
     android:screenOrientation="portrait" 
     android:theme="@style/AppTheme.NoActionBar" /> 
    <activity android:name=".SplashActivity"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
</application> 

+2

请将清单和build.gradle添加到问题 –

+0

您的设备是否有摄像头?如果是,它是否具有自动对焦功能?包含'android.hardware.camera.autofocus'特性*隐式*声明'android.hardware.camera'特性,它很可能会覆盖'android.hardware.camera'特性的'android:required =“false”'。 – cygery

回答

1

要修复,从你的清单中删除的<uses-feature android:name="android.hardware.camera.autofocus" />标签。不过不要担心,as the docs say below,您的应用程序将仍然正常工作不支持自动对焦会收到一个“假”回调 这个接口

http://developer.android.com/reference/android/hardware/Camera.AutoFocusCallback.html

设备。如果您的应用程序需要自动对焦并且不应将自动对焦 安装在没有自动对焦的设备上,则必须声明您的 应用程序使用了清单元素 中的android.hardware.camera.autofocus功能。

+0

我已从清单中删除标记。它仍然不兼容。更新已经完成,因为它刚更新了我的其他设备之一。 –

+0

什么是违规设备型号和制造商 – petey

+0

这是一个运行Android 4.4.2的沃达丰智能4。我还有其他几个测试设备,这是唯一声称不兼容的设备。 –