gpt4 book ai didi

Android 应用支持零设备?

转载 作者:行者123 更新时间:2023-11-29 20:26:51 25 4
gpt4 key购买 nike

我已经阅读了所有与此问题相关的 SO 问题,但没有一个帮助我解决了这个问题。我上传了一个早期的 alpha,它支持大约 8000 多台设备,但根据 Google Play,当前版本支持零。

我只有两个 uses-permission 语句,没有 uses-feature 语句。我已经尝试删除使用许可声明,但是(尽管我收到另一个关于不存在计费的警告)据称我仍然支持零设备,即使没有那些。

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hearttech.intimacytoolbox" >

<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET"/>

<application
android:name=".Application"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_shortname"
android:theme="@style/Theme.NoTitle" >
<activity
android:name=".MainActivity"
android:label="@string/app_shortname"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
[SNIPPED a bunch of other activities from here for length]
</application>
</manifest>

build.gradle:

apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'IntimacyToolboxKey'
keyPassword 'fakepassword'
storeFile file('/Users/dave/Dropbox/Intimacy Toolbox/android/Ancillaries/android.jks')
storePassword 'fakepassword'
}
}
compileSdkVersion 23
buildToolsVersion "23"
defaultConfig {
applicationId "com.hearttech.intimacytoolbox"
minSdkVersion 15
targetSdkVersion 23
versionCode 3
versionName '0.2'

}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
debuggable true
}
}
sourceSets {
main { assets.srcDirs = ['src/main/assets'] }
}
productFlavors {
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('org.simpleframework:simple-xml:2.7.1') {
exclude module: 'stax'
exclude module: 'stax-api'
exclude module: 'xpp3'
}
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.google.guava:guava-collections:r03'
compile 'com.google.guava:guava-io:r03'
compile 'com.google.guava:guava-base:r03'
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:support-annotations:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'com.anjlab.android.iab.v3:library:1.0.27'
}

我在某些地方看到重复的库会导致这个问题,但我没有在使用 jcenter 的依赖系统之外添加任何东西。在 gradle 日志输出中,它仅列出这些已准备好的库:

:app:prepareComAndroidSupportAppcompatV72300Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72300Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42300Library UP-TO-DATE
:app:prepareUkCoChrisjenxCalligraphy210Library UP-TO-DATE

对于 Google Play 为什么认为我不支持任何设备的任何见解,我将不胜感激。提前致谢!

最佳答案

所以,问题原来是 Apache Commons 编解码器库。我已经使用 jcentral 导入了库,jcentral 是 Android Studio 的默认存储库。这适用于我需要的其他库,但对于 Apache Commons,当以这种方式上传 APK 时,Google Play APK uploader 将 commons-codec-1.8.jar 列为应用程序的“ native 平台”,这显然使应用程序不兼容与所有设备。

为了解决这个问题,我改为从 Apache Commons 网站下载 .jar 文件并将其添加到我的 [项目根目录]/app/libs 目录,并从 gradle.build 中删除依赖行。这解决了问题!

关于Android 应用支持零设备?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32432037/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com