I'm trying to buildozer android debug deploy
in my cygwin environment. So far it worked quite well, but upon trying to build, I run into the following error:
$ buildozer android debug deploy
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 92, in check_requirements
self._set_win32_java_home()
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 186, in _set_win32_java_home
import _winreg
ImportError: No module named _winreg
# Install platform
# Apache ANT found at /home/Data/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /home/Data/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/Data/.buildozer/android/platform/android-ndk-r9c
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Command failed: ./distribute.sh -m "kivy" -d "first_kivy_test"
What is funny, is that if I do java -version
in cygwin it returns
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
so cygwin does know java. What am I missing here?
EDIT: Ok, I've tried to do the following in the android.py file of buildozer on line 92:
import cygwinreg as _winreg
But that just gave me the following error instead of the _winreg not recognized:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 92, in check_requirements
self._set_win32_java_home()
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 191, in _set_win32_java_home
self.buildozer.environ['JAVA_HOME'] = java_home
File "/usr/lib/python2.7/site-packages/cygwinreg-1.0-py2.7.egg/cygwinreg/__init__.py", line 146, in __exit__
self.Close()
NameError: global name 'self' is not defined
EDIT2:
I've managed to angle to this error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 92, in check_requirements
self._set_win32_java_home()
File "/usr/lib/python2.7/site-packages/buildozer-0.15_dev-py2.7.egg/buildozer/targets/android.py", line 187, in _set_win32_java_home
with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, r"SOFTWARE\JavaSoft\Java Development Kit") as jdk: #@UndefinedVariable
AttributeError: __exit__
EDIT 3:
I've already set the environment variable JAVA_HOME to my SDK path, so that cannot be the problem. I think it's a problem of winreg not being able to properly import that path.
EDIT 4: Through the help of a nice guy called Gavin Bravery I'm now no longer getting other errors than the java error. Current output on trying to
buildozer android debug deploy
is
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
cygwin warning:
MS-DOS style path detected: C:\Program Files (x86)\Java\jdk1.7.0_10/bin/javac.exe
Preferred POSIX equivalent is: /cygdrive/c/Program Files (x86)/Java/jdk1.7.0_10/bin/javac.exe
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
# Install platform
# Apache ANT found at /home/Data/.buildozer/android/platform/apache-ant-1.8.4
# Android SDK found at /home/Data/.buildozer/android/platform/android-sdk-21
# Android NDK found at /home/Data/.buildozer/android/platform/android-ndk-r9c
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
# Android packages installation done.
# Check application requirements
# Check garden requirements
# Compile platform
# Command failed: ./distribute.sh -m "kivy" -d "kivytest"
With a
export JAVA_HOME=$( cygpath "JAVA_HOME" )
I can circumvent the path warning, so its down to the "No suitable Java found." Error. Does anyone have an idea on that?
Which OS version are you trying to run this on? Occasionally cygwin shows strange behaviour on 32bit OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With