Comments (7)
Apparently the default value for android.permissions is [""] and that one null value is not found in the list of valid permissions. Here is a patch to fix it:
diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py
index 2a5c496..953449f 100644
--- a/buildozer/targets/android.py
+++ b/buildozer/targets/android.py
@@ -117,7 +117,7 @@ class TargetAndroid(Target):
permissions = self.buildozer.config.getlist(
'app', 'android.permissions', [])
for permission in permissions:
- if permission not in available_permissions:
+ if permission and permission not in available_permissions:
errors.append(
'[app] "android.permission" contain an unknown'
' permission {0}'.format(permission))
from buildozer.
Actually, here is a better patch that also fixes the typo in the error message:
diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py
index 2a5c496..2ec7bae 100644
--- a/buildozer/targets/android.py
+++ b/buildozer/targets/android.py
@@ -117,9 +117,9 @@ class TargetAndroid(Target):
permissions = self.buildozer.config.getlist(
'app', 'android.permissions', [])
for permission in permissions:
- if permission not in available_permissions:
+ if permission and permission not in available_permissions:
errors.append(
- '[app] "android.permission" contain an unknown'
+ '[app] "android.permissions" contain an unknown'
' permission {0}'.format(permission))
super(TargetAndroid, self).check_configuration_tokens(errors)
from buildozer.
Can you do a pull request of that? :)
(there is an other grammar mistake in the error message by the way :P)
from buildozer.
I have never done a pull request before, but I am happy to try.
I realized that buildozer still fails later on when android.permissions is left blank
build.py: error: argument --permission: expected one argument
# Command failed: /usr/bin/python2.7 build.py --name 'Bob the Hamster Dirt Dig' --version 0.1 --package com.hamsterrepublic.bobdirt --private /home/james/src/secrethamster/kivy/bobdirt/.buildozer/android/app --sdk 14 --minsdk 8 --permission --presplash /home/james/src/secrethamster/kivy/bobdirt/.buildozer/android/app/./src/../distimg/presplash.jpg --icon /home/james/src/secrethamster/kivy/bobdirt/.buildozer/android/app/./src/../distimg/icon.png debug
I'll see if I can come up with a more correct patch.
from buildozer.
I would like to learn to do a pull request, but It seems complicated, so for now, here is a better patch. This does not produce any --permission arguments for blank permissions
diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py
index 2a5c496..3625788 100644
--- a/buildozer/targets/android.py
+++ b/buildozer/targets/android.py
@@ -116,10 +116,11 @@ class TargetAndroid(Target):
if available_permissions:
permissions = self.buildozer.config.getlist(
'app', 'android.permissions', [])
+ print permissions
for permission in permissions:
- if permission not in available_permissions:
+ if permission and permission not in available_permissions:
errors.append(
- '[app] "android.permission" contain an unknown'
+ '[app] "android.permissions" contains an unknown'
' permission {0}'.format(permission))
super(TargetAndroid, self).check_configuration_tokens(errors)
@@ -372,7 +373,8 @@ class TargetAndroid(Target):
permissions = config.getlist('app',
'android.permissions', [])
for permission in permissions:
- build_cmd += ' --permission {0}'.format(permission)
+ if permission:
+ build_cmd += ' --permission {0}'.format(permission)
# add presplash
presplash = config.getdefault('app', 'presplash.filename', '')
from buildozer.
Okay. I sent a pull request for a proper fix for this.
from buildozer.
fixed
from buildozer.
Related Issues (20)
- using Lottie HOT 1
- Dependency Dashboard
- [iOS] Cannot publish IPA: YourApp/_applibs/*/*.so binary file is not permitted. HOT 3
- Buildozer builds apk successfully, but now cannot install it. Even past working apps. HOT 5
- FAILURE: Build failed with an exception. Warning: android:extractNativeLibs should not be specified in this source AndroidManifest.xml file. HOT 1
- error on build
- [Support] specify our own Android SDK directory to buildozer HOT 3
- Buildozer failed to execute last command. Can anyone please help me. I have been facing this error since a week. I have tried Buildozer in both collab and in github actions but it didnt help. I have also tried uncommenting the p4a.branch line and changing the master to develop HOT 1
- how to package the indirect dependency? HOT 2
- buildozer fails to build .apk HOT 1
- buildozer.spec and spaces in package.name
- Problem Buildozer -v android debug command
- How does Buildozer handle libraries? HOT 1
- Buildozer Android Build Fails with SymPy: ImportError for 'Mapping' from 'collections' HOT 1
- ..
- python3 '-m', 'ensurepip', '--upgrade', '--default-pip' returned non-zero exit status 1 HOT 3
- buildozer faild shows Exception in thread background thread clean assembleDebug
- App Crashes whenever I open it on my phone HOT 3
- Buildozer does not package sdl2 properly when sourcing locally HOT 2
- Android debug error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildozer.