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

android clean not working (FileNotFoundError: [Errno 2] No such file or directory) #732

Closed
Petar-Luketina opened this issue Oct 28, 2018 · 3 comments

Comments

@Petar-Luketina
Copy link

Hey everyone,

Every time I try to do buildozer android clean I get a strange error. If anyone has any insight, I would appreciate any advice! Thank you in advance!!

# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Run '/home/pl/anaconda3/bin/python -m pythonforandroid.toolchain clean_builds --color=always --storage-dir="/home/pl/Desktop/X/.buildozer/android/platform/build"'
# Cwd /home/pl/Desktop/X/.buildozer/android/platform/python-for-android-new-toolchain
Traceback (most recent call last):
  File "/home/pl/anaconda3/bin/buildozer", line 11, in <module>
    sys.exit(main())
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/__init__.py", line 1059, in run_command
    self.target.run_commands(args)
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/targets/android_new.py", line 202, in cmd_clean
    self._p4a("clean_builds")
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/targets/android_new.py", line 43, in _p4a
    return self.buildozer.cmd(self._p4a_cmd + cmd + self.extra_p4a_args, **kwargs)
  File "/home/pl/anaconda3/lib/python3.6/site-packages/buildozer/__init__.py", line 286, in cmd
    process = Popen(command, **kwargs)
  File "/home/pl/anaconda3/lib/python3.6/subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "/home/pl/anaconda3/lib/python3.6/subprocess.py", line 1333, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/home/pl/Desktop/X/.buildozer/android/platform/python-for-android-new-toolchain'
@clevermindgames
Copy link

clevermindgames commented Oct 30, 2018

As a workaround, create folder ‘python-for-android-new-toolchain’ in '/home/pl/Desktop/X/.buildozer/android/platform/'. No need to put any files inside. After this buildozer android clean should work without issues.

@Petar-Luketina
Copy link
Author

@clevermindgames , thanks for fixing the issue!! I'll continue the instructions from your website right now to get admob to work.

@gbm001
Copy link

gbm001 commented May 2, 2019

I seem to now have the reverse problem - I have to create a python-for-android folder as I only have a python-for-android-new-toolchain folder.
It then fails with a different error
/usr/bin/python3: Error while finding module specification for 'pythonforandroid.toolchain' (ModuleNotFoundError: No module named 'pythonforandroid')

Works if you just symlink python-for-android to python-for-android-new-toolchain though.

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