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

buildozer does not find android #750

Closed
boxconnect opened this issue Nov 20, 2018 · 6 comments
Closed

buildozer does not find android #750

boxconnect opened this issue Nov 20, 2018 · 6 comments

Comments

@boxconnect
Copy link

boxconnect commented Nov 20, 2018

I did install buildozer via pip install buildozer in a virtual environment. Following the instructions, I did buildozer init in the directory in question, followed by buildozer android debug deploy run. The latter fails with android not being found. It seems to look in the actual path for the android-sdk (which is not there).

My log is (with log_level = 2 from the spec file):

# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Search for Git (git)
#  -> found at /usr/bin/git
# Search for Cython (cython)
#  -> found at /Users/janmoehrke/Documents/Code/kivy/env/bin/cython
# Search for Java compiler (javac)
#  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac
# Search for Java keytool (keytool)
#  -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/keytool
# Install platform
# Run "/Users/janmoehrke/Documents/Code/kivy/env/bin/python -m pip install -q  'appdirs' 'colorama>=0.3.3' 'jinja2' 'six'"
# Cwd None
# Apache ANT found at /Users/janmoehrke/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/janmoehrke/.buildozer/android/platform/android-sdk-20
# Android NDK found at /Users/janmoehrke/.buildozer/android/platform/android-ndk-r9c
# Run '/Users/janmoehrke/.buildozer/android/platform/android-sdk-20/tools/android list sdk -u -e'
# Cwd /Users/janmoehrke/.buildozer/android/platform
Refresh Sources:
  Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
  Validate XML
  Parse XML
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
  Validate XML: https://dl-ssl.google.com/android/repository/repository-7.xml
  Parse XML:    https://dl-ssl.google.com/android/repository/repository-7.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Refresh Sources:
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Refresh Sources:
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Packages available for installation or update: 2
----------
id: 1 or "tools"
     Type: Tool
     Desc: Android SDK Tools, revision 22.6.2
----------
id: 2 or "platform-tools"
     Type: PlatformTool
     Desc: Android SDK Platform-tools, revision 19.0.1
Refresh Sources:
  Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml
  Validate XML
  Parse XML
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl-ssl.google.com/android/repository/repository-7.xml
  Validate XML: https://dl-ssl.google.com/android/repository/repository-7.xml
  Parse XML:    https://dl-ssl.google.com/android/repository/repository-7.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Refresh Sources:
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Refresh Sources:
  Fetching URL: https://dl-ssl.google.com/android/repository/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/glass/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Validate XML: https://dl-ssl.google.com/android/repository/extras/intel/addon.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-wear/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/android-tv/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis/sys-img.xml
  Fetching URL: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
  Validate XML: https://dl-ssl.google.com/android/repository/sys-img/google_apis_playstore/sys-img.xml
Packages available for installation or update: 2
----------
id: 1 or "tools"
     Type: Tool
     Desc: Android SDK Tools, revision 22.6.2
----------
id: 2 or "platform-tools"
     Type: PlatformTool
     Desc: Android SDK Platform-tools, revision 19.0.1

# Run (expect) '/Users/janmoehrke/.buildozer/android/platform/android-sdk-20/tools.save/android update sdk -u -a -t tools,platform-tools'
# Cwd None
Traceback (most recent call last):
  File "/Users/janmoehrke/Documents/Code/kivy/env/bin/buildozer", line 11, in <module>
    load_entry_point('buildozer==0.36.dev0', 'console_scripts', 'buildozer')()
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/scripts/client.py", line 13, in main
    Buildozer().run_command(sys.argv[1:])
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/__init__.py", line 1059, in run_command
    self.target.run_commands(args)
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/target.py", line 92, in run_commands
    func(args)
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/target.py", line 102, in cmd_debug
    self.buildozer.prepare_for_build()
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/__init__.py", line 176, in prepare_for_build
    self.target.install_platform()
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/targets/android.py", line 504, in install_platform
    self._install_android_packages()
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/targets/android.py", line 443, in _install_android_packages
    self._android_update_sdk('tools,platform-tools')
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/targets/android.py", line 355, in _android_update_sdk
    ' -Dfile.encoding=UTF-8'
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/buildozer-0.36.dev0-py3.6.egg/buildozer/__init__.py", line 379, in cmd_expect
    return spawnu(command, **kwargs)
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/pexpect-4.6.0-py3.6.egg/pexpect/pty_spawn.py", line 833, in spawnu
    return spawn(*args, **kwargs)
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/pexpect-4.6.0-py3.6.egg/pexpect/pty_spawn.py", line 204, in __init__
    self._spawn(command, args, preexec_fn, dimensions)
  File "/Users/janmoehrke/Documents/Code/kivy/env/lib/python3.6/site-packages/pexpect-4.6.0-py3.6.egg/pexpect/pty_spawn.py", line 276, in _spawn
    'executable: %s.' % self.command)
pexpect.exceptions.ExceptionPexpect: The command was not found or was not executable: /Users/janmoehrke/.buildozer/android/platform/android-sdk-20/tools.save/android.
@tiglinux
Copy link

I have a equal problem too =\ I not execute the command : buildozer android debug deploy run

@SomberNight
Copy link
Contributor

Also ran into this.
Worked around by symlinking
.../.buildozer/android/platform/android-sdk-20/tools to .../.buildozer/android/platform/android-sdk-20/tools.save

@tiglinux
Copy link

Is there a solution for this? I would need to know as soon as possible .. I tried with Kivy Launcher on my phone and it did not work too ... =

@tiglinux
Copy link

I solve this problem using on terminal now -->
$ ./buildozer/android/plataform/android-sdk-20/tools/android

I update the SDK archives installed the packages - android20sdk and execute the command --> buildozer android debug and runs :)

Opctionality Update too the kivy,buildozer and android-sdk..

@droidman
Copy link

Also ran into this.
Worked around by symlinking
.../.buildozer/android/platform/android-sdk-20/tools to .../.buildozer/android/platform/android-sdk-20/tools.save

This fixed my issues too. There was no tools.save folder when I browsed the directory initially.

@Julian-O
Copy link
Contributor

This appears to be a problem with Android SDK installer, version 22.

It has probably been fixed there since 2018.

Closing as Stale, but if anyone is still having the problem, please let us know.

@Julian-O Julian-O closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants