我尝试过在stackoverflow上找到的任何内容,但Google Play继续说我的应用程序受0设备支持。
这是我的Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="rapture.engineering.stuffdrawer">
<!--
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
-->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-feature android:name="android.hardware.camera2" android:required="false" />
<!-- <uses-feature android:name="com.android.hardware.camera2.full" android:required="false"/> -->
<!-- <uses-feature android:name="android.hardware.camera2" /> -->
<supports-screens
android:anyDensity="true"
android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true" />
<compatible-screens>
<!-- small size screens -->
<screen android:screenSize="small" android:screenDensity="ldpi" />
<screen android:screenSize="small" android:screenDensity="mdpi" />
<screen android:screenSize="small" android:screenDensity="hdpi" />
<screen android:screenSize="small" android:screenDensity="xhdpi" />
<screen android:screenSize="small" android:screenDensity="xxhdpi" />
<screen android:screenSize="small" android:screenDensity="xxxhdpi" />
<!--Only hdpi and xhdpi for normal size screens -->
<screen android:screenSize="normal" android:screenDensity="ldpi" />
<screen android:screenSize="normal" android:screenDensity="mdpi" />
<screen android:screenSize="normal" android:screenDensity="hdpi" />
<screen android:screenSize="normal" android:screenDensity="xhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxhdpi" />
<screen android:screenSize="normal" android:screenDensity="xxxhdpi" />
<!-- all large size screens -->
<screen android:screenSize="large" android:screenDensity="ldpi" />
<screen android:screenSize="large" android:screenDensity="mdpi" />
<screen android:screenSize="large" android:screenDensity="hdpi" />
<screen android:screenSize="large" android:screenDensity="xhdpi" />
<screen android:screenSize="large" android:screenDensity="xxhdpi" />
<screen android:screenSize="large" android:screenDensity="xxxhdpi" />
<!-- all xlarge size screens -->
<screen android:screenSize="xlarge" android:screenDensity="ldpi" />
<screen android:screenSize="xlarge" android:screenDensity="mdpi" />
<screen android:screenSize="xlarge" android:screenDensity="hdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xxhdpi" />
<screen android:screenSize="xlarge" android:screenDensity="xxxhdpi" />
</compatible-screens>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:largeHeap="true"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<activity android:name="rapture.engineering.stuffdrawer.ActivityMain"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="rapture.engineering.stuffdrawer.ActivityAdd"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"></activity>
<activity android:name="rapture.engineering.stuffdrawer.ActivityCamera2"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen"></activity>
<activity android:name="rapture.engineering.stuffdrawer.ActivityExplore"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"></activity>
<activity android:name="rapture.engineering.stuffdrawer.ActivityOptions"
android:screenOrientation="sensorPortrait"
android:windowSoftInputMode="adjustResize|stateHidden"
android:theme="@style/Theme.AppCompat.Light.NoActionBar"></activity>
<activity
android:name="rapture.engineering.stuffdrawer.ActivityCamera1">
</activity>
<activity
android:name="rapture.engineering.stuffdrawer.RuntimePermissionActivity"
android:theme="@style/squarecamera__CameraFullScreenTheme.NoUI" >
</activity>
</application>
</manifest>
Gradle App:
apply plugin: 'com.android.application'
android {
signingConfigs {
StuffDrawer {
keyAlias '*******'
keyPassword '**********'
storeFile file('C:/***********')
storePassword '***********'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId 'rapture.engineering.stuffdrawer'
minSdkVersion 16
targetSdkVersion 25
versionCode 15
versionName '1.15'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.StuffDrawer
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
jniDebuggable false
renderscriptDebuggable false
signingConfig signingConfigs.StuffDrawer
}
}
productFlavors {
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:support-v13:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.anjlab.android.iab.v3:library:1.0.38'
}
正如您所看到的,我尝试添加所有屏幕尺寸,以不同方式声明camera2并从Manifest中删除USES-SDK,因为它与Gradle冲突。
当支持CAMERA2 api以编程方式停用时,我的应用需要Camera1和Camera2 API。
请问,有什么建议吗?非常感谢
编辑:让我补充一点,我最近更改了项目名称,但我不知道这是否有用。
编辑:我尝试删除所有权限和使用功能,同样的问题。
我使用APK Analyzer进行了分析,结果显示:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="15"
android:versionName="1.15"
package="rapture.engineering.stuffdrawer"
platformBuildVersionCode="25"
platformBuildVersionName="7.1.1">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<supports-screens
android:anyDensity="true"
android:resizeable="true" />
<application
android:theme="@ref/0x7f080115"
android:label="@ref/0x7f060021"
android:icon="@ref/0x7f030000"
android:allowBackup="true"
android:largeHeap="true"
android:supportsRtl="true"
android:roundIcon="@ref/0x7f030001">
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityMain"
android:screenOrientation="7"
android:windowSoftInputMode="0x12">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityAdd"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080116"
android:name="rapture.engineering.stuffdrawer.ActivityCamera2"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityExplore"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityOptions"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:name="rapture.engineering.stuffdrawer.ActivityCamera1" />
<activity
android:theme="@ref/0x7f08016e"
android:name="rapture.engineering.stuffdrawer.RuntimePermissionActivity" />
</application>
</manifest>
我在这里有一个RED点:
xmlns:android="http://schemas.android.com/apk/res/android"
错误是:URI未注册
编辑:将Android Studio更新到最新的稳定版本后,新的APK分析器将返回权限和用途:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="15"
android:versionName="1.15"
package="rapture.engineering.stuffdrawer"
platformBuildVersionCode="25"
platformBuildVersionName="7.1.1">
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<uses-permission
android:name="android.permission.CAMERA" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission
android:name="com.android.vending.BILLING" />
<uses-feature
android:name="android.hardware.camera2"
android:required="false" />
<supports-screens
android:anyDensity="true"
android:resizeable="true" />
<application
android:theme="@ref/0x7f080115"
android:label="@ref/0x7f060021"
android:icon="@ref/0x7f030000"
android:allowBackup="true"
android:largeHeap="true"
android:supportsRtl="true"
android:roundIcon="@ref/0x7f030001">
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityMain"
android:screenOrientation="7"
android:windowSoftInputMode="0x12">
<intent-filter>
<action
android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityAdd"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080116"
android:name="rapture.engineering.stuffdrawer.ActivityCamera2"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityExplore"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:theme="@ref/0x7f080115"
android:name="rapture.engineering.stuffdrawer.ActivityOptions"
android:screenOrientation="7"
android:windowSoftInputMode="0x12" />
<activity
android:name="rapture.engineering.stuffdrawer.ActivityCamera1" />
<activity
android:theme="@ref/0x7f08016e"
android:name="rapture.engineering.stuffdrawer.RuntimePermissionActivity" />
</application>
</manifest>
答案 0 :(得分:0)
目前,Google Play开发者控制台存在用户界面问题,因为它在上传新的APK更新时显示0个受支持的设备。
您的应用很可能没有问题。