簡體   English   中英

應用程序與您的設備不兼容。所有設備

[英]App not compatible with your device. ALL devices

發布我的應用程序后,我收到了與我的設備不兼容的消息。 即使我在同一台設備上測試它。 對於嘗試下載應用的所有人,都會顯示“錯誤”消息,因為它與您的設備不兼容。 Folow the Gradle:

    apply plugin: 'com.android.application'
   apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.ths.dev.cadeoprefeito"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.1.0-alpha3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3'
    //FirebaseCORE
    implementation 'com.google.firebase:firebase-core:16.0.4'
    //FirebaseDatabase
    implementation 'com.google.firebase:firebase-database:16.0.3'
    //ADSFirebase
    implementation 'com.google.firebase:firebase-ads:16.0.1'
    //FirebaseAUTH
    implementation 'com.google.firebase:firebase-auth:16.0.4'
    //FirebaseStorage
    implementation 'com.google.firebase:firebase-storage:16.0.3'
    //FirebaseUI
    implementation 'com.firebaseui:firebase-ui-storage:0.6.0'
}

清單:

 <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ths.dev.cadeoprefeito">

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <!-- Permissões para foto -->
    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera2" />

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">

        <!--
             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=".Activity.MapsActivity"
            android:label="Cadê o Prefeito"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".Activity.SplashActivity"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

我不知道我能做什么。 有幫助嗎?

你應該在android:name="android.hardware.camera2"部分添加android:required="false"

當您為某個功能聲明android:required="false" ,表示該應用程序更喜歡使用該功能(如果存在於設備上),但如果需要,它可以在沒有指定功能的情況下運行。

 <uses-feature android:name="android.hardware.camera2" android:required="false"/>

不要認為android.hardware.camera2是當前設備上常見的原因 - 當不需要它時,必須提供傳統camera作為后備選項(帶有地圖和閃屏活動,我會而不知道它應該有什么好處)。 原因是:a)將supports-screens元素添加到Manifest.xml ...因為沒有它,不支持單個屏幕大小。 b)在文件底部添加apply plugin: 'com.google.gms.google-services'

Google Play商店截圖

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM