Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail build android #3

Closed
zeptoZB opened this issue Sep 22, 2017 · 8 comments
Closed

Fail build android #3

zeptoZB opened this issue Sep 22, 2017 · 8 comments

Comments

@zeptoZB
Copy link

zeptoZB commented Sep 22, 2017

Line 14 in plugin.xml:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18"/>

It conflicts with the same permission without the android SDK version of another plugin.
Solution was remove version dependency in plugin.xml...

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

@tbrebant
Copy link

tbrebant commented Sep 25, 2017

It makes sense: our plugin only needs this permission on Android 4.3 or less (following versions are allowing an application to write in its own application-specific directories without this permission) and the less permissions you ask to your user, better it is.

So if another plugin does not have this particularity and needs this permission on all versions of Android, I can understand the conflict between declarations.

On the other hand, I don't know why Cordova did not merged smartly by keeping only the larger scope. I don't know if he's able to do that. I'll keep the issue open until we investigate.

@zeptoZB
Copy link
Author

zeptoZB commented Sep 26, 2017

You're correct in your assertions, but unfortunately Cordova does not properly merge this situation, leading to compile error by duplicity of permission. Correct would be to fix the Cordova, but this is out of my reach.

@tbrebant
Copy link

Understood, I will add something about that in the documentation.

Not related to the issue: I'm curious, what version of Cordova CLI and Android engine are you using? If they are more recent than what we mentioned in the ReadMe (Cordova 6.5.0 and Android engine 4.1.1) and is working well I would be happy to know.

@zeptoZB
Copy link
Author

zeptoZB commented Nov 13, 2017

Sorry for the delay...
Ionic 3.13.0
Cordova 7.1.0
Android SDK Tools 25.2.5
Android SDK Platform-tools 26.0.1
Android SDK Build-tools 26.0.2
Android 7.1.1 (API 25) SDK Platform 25.3

@aluferraz
Copy link

same error here..

@aluferraz
Copy link

I think that for a better compatibility it would be better to leave the dependency without the minSdkVersion spec.

I will fork your repo in order to do that and use your plugin :), but please consider...

@tbrebant
Copy link

Hi. I just merged the PR mentioning the potential conflict and how to solve it in the documentation.

I would not like this plugin to request more permissions than what is required so I prefer to keep the version cap.

@aluferraz
Copy link

Thanks !!! And congrats, it is a great plugin !

@zeptoZB zeptoZB closed this as completed Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants