我正在将我的应用程序投入生产线,但遇到了问题。 当我发布App时,我表明它与任何设备都不兼容。 在Google Play控制台中,它表明我的应用程序不兼容。另外,我在手机上的Google Play商店中找不到它。
我做错了什么?你有类似的问题吗?
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="zzz.com.mobile">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ChANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera2" />
<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">
<activity
android:name=".activity.MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
gradle.app
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
signingConfigs {
config {
keyAlias 'MyAndroidKey'
keyPassword ANDROID_KEY_PASSWORD
storeFile file('/zzz/android.jks')
storePassword ANDROID_STORE_PASSWORD
}
}
compileSdkVersion 27
defaultConfig {
applicationId "zzz.com.mobile"
minSdkVersion 22
targetSdkVersion 26
versionCode 13
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
compileOptions {
android.compileOptions.sourceCompatibility 1.8
android.compileOptions.targetCompatibility 1.8
}
productFlavors {
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
//FlexBox
implementation 'com.google.android:flexbox:1.0.0'
//room database
implementation 'android.arch.persistence.room:runtime:1.1.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:design:27.1.1'
kapt "android.arch.persistence.room:compiler:1.1.0"
//---
//websocket
implementation 'org.java-websocket:Java-WebSocket:1.3.4'
implementation 'com.github.NaikSoftware:StompProtocolAndroid:1.4.4'
//---
//Fast android networking
implementation 'com.amitshekhar.android:android-networking:1.0.1'
//Jackson (JSON)
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.4'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin:2.9.5'
//---
//Keyboard visibility
implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
//E-mail
implementation 'com.sun.mail:android-mail:1.5.5'
implementation 'com.sun.mail:android-activation:1.5.5'
//---
//FTP
implementation 'commons-net:commons-net:3.6'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
答案 0 :(得分:6)
很高兴您已准备好发布该应用程序。
在manifest.xml
的{{1}}中为 hardware.camera2 添加代码 android:required=false
。
重建您的项目。上载具有不同版本的新APK并发布:)
希望有帮助!