Thi*_*tos 3 java android device
发布我的应用程序后,我收到消息它与我的设备不兼容。即使我在同一台设备上测试它。尝试下载该应用程序的每个人都会显示“错误”消息,就像它与您的设备不兼容一样。跟随摇篮:
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'
}
Run Code Online (Sandbox Code Playgroud)
清单:
<?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>
Run Code Online (Sandbox Code Playgroud)
我不知道我能做什么。有什么帮助吗?
您应该添加android:required="false"的android:name="android.hardware.camera2"部分。
当您声明
android:required="false"一个功能时,这意味着应用程序更喜欢使用设备上存在的功能,但如果需要,它被设计为在没有指定功能的情况下运行。
<uses-feature android:name="android.hardware.camera2" android:required="false"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
84 次 |
| 最近记录: |