Comments (2)
There are two problems with the approach you've described.
The first problem is that you're using relative paths. "resources/screenshot.png" isn't an absolute location on your filesystem; it's a relative location that will be anchored relative to the current working directory. The current working directory for a BeeWare app is the user's home directory. If you want to reference files in your app, you need to provide an absolute path. Toga does this implicitly - when you describe an icon being in resources/icons
, Toga does the work to turn that into an absolute path relative to the app's location. If you're constructing paths yourself, you need to provide the full absolute path. On Android, there's the additional complication that you need to pick a location that you can actually read and/or write to. Android's filesystem doesn't allow arbitrary file system access; there are only some locations that are available for reading and writing.
The second problem is that you're describing that you want to use pyautogui on Android. That won't work, because pyautogui doesn't work an Android.
I'm going to close this ticket because you've opened it against the BeeWare project website, and this isn't an issue with the website. If you need additional support getting your app to work, please open a discussion topic on the Briefcase respository.
from beeware.github.io.
@qinantong: Although you're asking about Android: this log clearly shows that you're running the app on Windows using briefcase dev
. You might want to look at the mobile tutorial to learn how to run an app on a phone.
Android's filesystem doesn't allow arbitrary file system access; there are only some locations that are available for reading and writing.
See the Toga paths documentation for advice on which locations you should use.
The first problem is that you're using relative paths
It looks like the code is actually constructing an absolute path, but in a directory that doesn't exist yet.
The current working directory for a BeeWare app is the user's home directory.
Android doesn't have a user home directory, so the working directory is the root directory on every device I've seen, though I've never seen this officially documented. The paths documentation already says that the working directory is unpredictable.
from beeware.github.io.
Related Issues (20)
- Translation to Russian HOT 1
- Broken Link in 'Challenge Coins' page. HOT 4
- Wrongly named list item in language selection dropdown on website HOT 1
- Status page for target platforms HOT 1
- Labelling the GitHub repository tickets HOT 2
- Beeware webpage's broken links HOT 4
- Broken tag on homepage "Projects" navigation HOT 3
- RuntimeError: Failed to install dependency package. HOT 2
- ModuleNotFoundError: No module named 'werkzeug.contrib' HOT 4
- Add preview capability for PR changes HOT 3
- Stop listing Windows Phone for Enthusiasts ML HOT 1
- Add metatags to show preview content when sharing website links
- setup.py commands not found HOT 2
- when I run "briefcase run android", “Obtaining device skin... Unable to download pixel_3a device skin; is your computer offline?” HOT 26
- [Feature request] Text directions like CSS writing-mode HOT 1
- Replace Netlify HOT 12
- Add handling for Mastodon
- The Contribute To Beeware Button is too thin in some breakpoints HOT 1
- Layout Issues on Community Page Sideboard at mid-sized viewports HOT 4
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 beeware.github.io.