发布我的应用程序后,我收到消息它与我的设备不兼容。 即使我在同一台设备上测试它。 每个尝试下载该应用程序的人都会看到“错误”消息,就像它与您的设备不兼容一样。 遵循 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'
}
list :
<?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:required="false"
在android:name="android.hardware.camera2"
部分。
When you declare
android:required="false"
for a feature, it means that the application prefers to use the feature if present on the device, but that it is designed to function without the specified feature, if necessary.
<uses-feature android:name="android.hardware.camera2" android:required="false"/>
关于java - 应用与您的设备不兼容。所有设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52720120/