我们不明白为什么在Google Play开发者控制台上传我们的apk后,我们支持0个设备。我们个人的想法是Manifest和build.gradle都可以:我们可以生成apk,而不是我们可以毫无问题地将它分发给我们的Beta测试人员。你能帮助我们吗?在您看来,我们的错误在哪里?
AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.hendyghsta.bacameter"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25"/>
<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.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.FLASHLIGHT"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-feature
android:name="android.hardware.camera"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera2.full"
android:required="false"/>
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false"/>
<uses-feature
android:name="android.hardware.location"
android:required="false"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="false"/>
<application
android:name=".common.App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.AppTheme">
<activity android:name=".activity.LoginActivity">
</activity>
<activity android:name=".activity.TesterActivity">
</activity>
<activity android:name=".activity.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".activity.ScanActivity"
android:parentActivityName=".activity.MainActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".activity.ResultActivity"
android:label="Input Result"
android:parentActivityName=".activity.MainActivity"
android:theme="@style/Theme.AppTheme">
</activity>
<activity
android:name=".activity.MainActivity"
android:label="Pembaca Meter"
android:theme="@style/Theme.AppTheme">
</activity>
<activity
android:name=".activity.SettingActivity"
android:label="Pengaturan"
android:theme="@style/Theme.AppTheme">
</activity>
<activity
android:name="com.afollestad.materialcamera.CaptureActivity"
android:theme="@style/MaterialCamera.CaptureActivity"/>
<activity
android:name="com.afollestad.materialcamera.CaptureActivity2"
android:theme="@style/MaterialCamera.CaptureActivity"/>
<service
android:name=".common.UploadService"
android:permission="android.permission.BIND_JOB_SERVICE"/>
<activity
android:name=".activity.LogActivity"
android:parentActivityName=".activity.MainActivity"
android:theme="@style/Theme.AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.MainActivity"/>
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name=".activity.MapsActivity"
android:label="@string/title_activity_maps"
android:parentActivityName=".activity.MainActivity"
android:theme="@style/Theme.AppTheme">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activity.MainActivity"/>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="***"/>
<service android:name=".account.MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name=".account.FirebaseIDService">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<activity android:name=".activity.PesanActivity" android:theme="@style/Theme.AppTheme">
</activity>
<activity android:name=".activity.BarcodeActivity" android:theme="@style/Theme.AppTheme" >
</activity>
<receiver
android:name=".common.ConnectivityReceiver"
android:enabled="true">
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
</application>
</manifest>
App Gradle :
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.hendyghsta.bacameter"
minSdkVersion 21
targetSdkVersion 25
versionCode 6
versionName "3.0.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
config {
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile file('C:/Users/Acer/.android/debug.keystore')
storePassword 'android'
}
}
buildTypes {
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
packagingOptions {
//exclude 'META-INF/DEPENDENCIES'
//exclude 'META-INF/LICENSE'
// exclude 'AndroidManifest.xml'
exclude 'lib/arm64-v8a/librealm-jni.so'
exclude 'lib/mips/librealm-jni.so'
exclude 'lib/x86/librealm-jni.so'
exclude 'lib/x86_64/librealm-jni.so'
exclude 'lib/x86/libopencv_java3.so'
exclude 'lib/x86/libanylineCore.so'
exclude 'lib/x86/libgnustl_shared.so'
}
}
repositories {
flatDir {
dirs 'libs'
}
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
}
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'
})
compile(name: 'anylinesdk-3.8.1', ext: 'aar')
compile project(':mcamera')
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
compile('com.pubnub:pubnub-android:3.7.14@aar') {
transitive = true;
}
compile('io.fabric.sdk.android:fabric:1.3.10@aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:support-v13:25.2.0'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.0.1'
compile 'io.reactivex:rxjava:1.1.3'
compile 'com.artemzin.rxjava:proguard-rules:1.1.3.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'org.glassfish:javax.annotation:10.0-b28'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.squareup:otto:1.3.8'
compile 'net.gotev:uploadservice-ftp:3.2.3'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.1.0'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'jp.wasabeef:recyclerview-animators:2.2.5'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.github.rey5137:material:1.2.4'
compile 'com.robinhood.ticker:ticker:1.1.1'
compile 'com.orhanobut:dialogplus:1.11@aar'
compile 'com.google.android.gms:play-services-vision:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.maps.android:android-maps-utils:0.4.4'
compile 'me.dm7.barcodescanner:zbar:1.8.4'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'io.realm:android-adapters:1.4.0'
testCompile 'junit:junit:4.12'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
apply plugin: 'com.google.gms.google-services'
答案 0 :(得分:1)
您的位置存在问题:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
警告:如果您的应用针对Android 5.0(API级别21)或更高版本,则必须声明您的应用使用清单文件中的android.hardware.location.network或android.hardware.location.gps硬件功能,具体取决于您的应用是从NETWORK_PROVIDER还是从GPS_PROVIDER接收位置更新。如果您的应用从这些位置提供商来源中收到位置信息,则需要声明应用在应用清单中使用这些硬件功能。在Android 5.0(API 21)之前运行版本的设备上,请求ACCESS_FINE_LOCATION或ACCESS_COARSE_LOCATION权限包括对位置硬件功能的隐含请求。但是,请求这些权限不会自动请求Android 5.0(API级别21)及更高级别的位置硬件功能。
所以添加
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
答案 1 :(得分:0)
您也可以从Manifest中删除uses-sdk标记。尝试上传其他版本。
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="25"/>
Google Developer Console也可能存在问题。他们正在更新系统。您可以尝试新的App App版本,尝试创建ALPHA版本。