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

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

问题描述

这是我第一次在这里问一个问题。

无论如何,正如标题所说,我试图将我的应用程序投放市场。

当我尝试上传签名的apk,我得到错误:


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

p>

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

  ... 
<使用权限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/>
<使用权限android:name =android.permission.ACCESS_WIFI_STATE/>
<使用权限android:name =android.permission.CHANGE_NETWORK_STATE/>
< uses-permission android:name =android.permission.CHANGE_WIFI_STATE/>
<使用权限android:name =android.permission.WAKE_LOCK/>
<使用权限android:name =android.permission.RECORD_VIDEO/>
< uses-permission android:name =android.permission.RECORD_AUDIO/>
<使用权限android:name =android.permission.GET_ACCOUNTS/>
< uses-permission android:name =android.permission.ACCESS_FINE_LOCATION/>
< uses-permission android:name =android.permission.ACCESS_COARSE_LOCATION/>
<使用权限android:name =android.permission.READ_CONTACTS/>
<! - 需要检索所有者姓名 - >
< uses-permission android:name =android.permission.READ_PROFILE/>
...

问题是我没有明确要求这个权限。
我在清单中声明了WRITE_EXTERNAL_STORAGE,它应该包含READ_EXTERNAL_STORAGE权限,但不包含maxsdkversion。

我还查看了库我正在导入。



在开始之前,我有两个版本的应用程序,一个用于android 2.3+,另一个用于android 4+。我可以上传Android 2.3及以上版本。



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

  ... 
compile'c​​om.android.support:support-v4:22.2.1'
compile'c​​om.android.support:appcompat-v7:22.2.1'

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

compile'c​​om.adobe.creativesdk.foundation:auth:0 .3.94'
compile'c​​om.adobe.creativesdk:image:4.0.0'
...

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



我使用最新版本的Android Studio和gradle插件1.2.3。

任何人都可以帮助我?

解决方案

我仍然不知道为什么它正在发生,但它看起来像库内有东西(即使我检查了他们的清单)。

无论如何,对我来说,解决方案是删除声明在我的清单中的库的许可:

 <使用权限
android:name =android.permission.READ_EXTERNAL_STORAGE
工具:节点=remove
tools:selector =com.aviary.android.feather.sdk/>

即使在库清单中没有声明maxsdkversion,Evverything也能正常工作。


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:

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" />
...

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.

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.

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'
...

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.

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" />

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

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

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