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

What is the way to add folders and files? #875

Closed
spartero opened this issue Apr 7, 2019 · 3 comments
Closed

What is the way to add folders and files? #875

spartero opened this issue Apr 7, 2019 · 3 comments

Comments

@spartero
Copy link

spartero commented Apr 7, 2019

After trying a simple example, I have taken the step to something more complex. I want to package a flask application that I have running for android. has the following structure:

- main.py
   - templates
      - plantilla.html
      - index.html
   - static
      - img
         - img.jp
      - css
         - style.css

In the configuration file (I only put the parts corresponding to the configuration of folders and files, the rest is by default):

source.dir = .
source.include_exts = py,html,css,jpg
source.include_patterns = templates/*.html,static/img/*.jpg,static/css/*.css

the apk created does not work on the phone and if I open the apk, I do not see any html file, css, jpg

What is the way to add folders and files?

@spartero
Copy link
Author

spartero commented Apr 8, 2019

I have already solved it, but I just have to put the extensions of the files to be packaged and the apk in source.include_exts = py, html, css, jpg. And stop commenting source.include_patterns. After doing this, delete the hidden buildozer folder and repackage it.

@spartero spartero closed this as completed Apr 8, 2019
@iruriksl
Copy link

After trying a simple example, I have taken the step to something more complex. I want to package a flask application that I have running for android. has the following structure:

- main.py
   - templates
      - plantilla.html
      - index.html
   - static
      - img
         - img.jp
      - css
         - style.css

In the configuration file (I only put the parts corresponding to the configuration of folders and files, the rest is by default):

source.dir = .
source.include_exts = py,html,css,jpg
source.include_patterns = templates/*.html,static/img/*.jpg,static/css/*.css

the apk created does not work on the phone and if I open the apk, I do not see any html file, css, jpg

What is the way to add folders and files?

I am facing the same problem. The apk build is success, but the other files instead of main.py is not found in the apk.
If you got any solution share it as the current buildozer & pythonfor android version are not including the files, dirs as defined under source.include_exts & source.include_patterns

@iruriksl
Copy link

I have already solved it, but I just have to put the extensions of the files to be packaged and the apk in source.include_exts = py, html, css, jpg. And stop commenting source.include_patterns. After doing this, delete the hidden buildozer folder and repackage it.

This doesn't worked

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

2 participants