我正在尝试在Playstore上发布应用程序,但它没有显示支持的设备0.我搜索了解决方案,但没有解决我的问题。我正在使用android studio开发。请帮帮我!
这是我的清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="vivek.brilliance_infosoft.dustbin">
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.camera2"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/MyMaterialTheme">
<activity
android:name=".activity.LauncherActivity"
android:label="@string/app_name"
android:theme="@style/StartUpActivityTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.general.MainActivity"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait">
</activity>
<activity android:name=".activity.admin.MainActivity"
android:windowSoftInputMode="adjustPan"
android:screenOrientation="portrait">
</activity>
<activity android:name=".activity.EditProfileActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name=".activity.MarkerReview"
android:screenOrientation="portrait">
</activity>
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="Axxxxxxxx_Xxxxxxxxxx-xxxxY"/>
</application>
</manifest>
这是我的gradle文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.infosoft.myApp"
minSdkVersion 10
targetSdkVersion 22
versionCode 2
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.firebase:firebase-client-android:2.3.1+'
}
答案 0 :(得分:1)
替换
<uses-feature android:name="android.hardware.camera2"
android:required="true"/>
用这个
<uses-feature android:name="android.hardware.camera2"
android:required="false"/>
我认为你必须使用 android.hardware.camera 而不是 android.hardware.camera2
答案 1 :(得分:1)
<uses-feature android:name="android.hardware.camera" android:required="true"/>
我无法将评论转换为答案,因此也添加了答案。