无法上传 apk:READ_EXTERNAL_STORAGE 具有不同的 maxSdkVersions [英] can't upload apk: READ_EXTERNAL_STORAGE with different maxSdkVersions

查看:30
本文介绍了无法上传 apk:READ_EXTERNAL_STORAGE 具有不同的 maxSdkVersions的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次在这里提问.
无论如何,正如标题所说,我正在尝试将我的应用程序投放市场.
当我尝试上传已签名的 apk 时,出现错误:

This is the first time I ask a question here.
Anyway, as the title says, I'm trying to put my application on the market.
When I try to upload the signed apk, I get the error:

使用不同的 maxSdkVersions 上传失败的权限 android.permission.READ_EXTERNAL_STORAGE 的重复声明.

Upload failed Duplicate declarations of permission android.permission.READ_EXTERNAL_STORAGE with different maxSdkVersions.

我尝试搜索存在的问题,但找不到解决方案.

I tried searching through the existent questions, but I can't find a solution.

...
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- needed to retrieve owner name -->
<uses-permission android:name="android.permission.READ_PROFILE" />
...

问题是我没有明确要求此权限.我在清单中声明了 WRITE_EXTERNAL_STORAGE,这应该包括 READ_EXTERNAL_STORAGE 权限,但没有maxsdkversion".

The problem is that I don't ask explicitly for this permission. I have the WRITE_EXTERNAL_STORAGE declared in the manifest, and this should include the READ_EXTERNAL_STORAGE permission, but without the "maxsdkversion".

我还查看了我正在导入的库.

I also looked into the libraries that I'm importing.

在继续之前,我有两个版本的应用程序,一个适用于 android 2.3+,一个适用于 android 4+.我可以毫无问题地上传Android 2.3+版本.

Before going on, I have two versions of the app, one for android 2.3+, one for android 4+. I can upload the Android 2.3+ version without any problem.

两个版本之间唯一不同的是,在android 4+"版本中,我正在导入creativeSDKImageEditing"(Aviary).我在 CreativeSDK 的清单中看到它声明了 READ_EXTERNAL_STORAGE 权限,但没有任何maxSdkVersion".

The only different thing between the two versions is that in the "android 4+" version i'm importing the "creativeSDKImageEditing" (Aviary). I saw that in the manifest of the CreativeSDK it's declared the READ_EXTERNAL_STORAGE permission, but without any "maxSdkVersion".

...
compile 'com.android.support:support-v4:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'

compile 'com.facebook.android:facebook-android-sdk:4.1.1'
compile 'com.github.chrisbanes.photoview:library:1.2.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.4.0' 
compile 'com.nineoldandroids:library:2.4.0@jar'
compile 'com.mixpanel.android:mixpanel-android:4.6.0'
compile 'com.intellij:annotations:12.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.github.johnkil.android-appmsg:appmsg:1.2.0'
compile 'ch.acra:acra:4.6.2'
compile 'com.android.support:multidex:1.0.0'

compile 'com.adobe.creativesdk.foundation:auth:0.3.94'
compile 'com.adobe.creativesdk:image:4.0.0'
...

我现在才面临这个问题,新的更新,而在我上传两个版本的应用程序之前没有任何问题.我没有更改清单,也没有更改 gradle 文件,所以我真的不知道发生了什么.

I'm facing this issue only now, with the new update, while before I uploaded both versions of the app without any problem. I haven't changed the manifest, nor the gradle files, so I really don't know what's happening.

我正在使用最新版本的 Android Studio 和 gradle 插件 1.2.3.
有人可以帮帮我吗?

I'm using the latest version of Android Studio and the gradle plugin 1.2.3.
Can anybody help me?

推荐答案

我仍然不知道为什么会这样,但看起来图书馆里有东西(即使我检查了他们的清单).
无论如何,我的解决方案是删除在我的清单中声明的​​库的权限:

I still don't know why it is happening, but it looks like that there was something inside a library (even if i checked their manifest).
Anyway the solution for me was to delete the permission of the library declaring in my manifest:

<uses-permission
    android:name="android.permission.READ_EXTERNAL_STORAGE"
    tools:node="remove"
    tools:selector="com.aviary.android.feather.sdk" />

一切正常,即使该库清单中没有声明maxsdkversion".

Evverything works fine, even if there is no "maxsdkversion" declared in that library manifest.

这篇关于无法上传 apk:READ_EXTERNAL_STORAGE 具有不同的 maxSdkVersions的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆