I have recently installed a Ubuntu 13.10 virtual machine and have set the Kivy development environment for it i.e cloning kivy, building a distribution with distribute.sh and building an apk with the build.py script. While packaging my project to APK file and while running the ./build.py script i had the following error :
[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
BUILD FAILED
/home/administrator/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/administrator/sdk/tools/ant/build.xml:659: null returned: 127
Total time: 1 second
Traceback (most recent call last):
File "./build.py", line 412, in <module>
make_package(args)
File "./build.py", line 336, in make_package
subprocess.check_call([ANT, arg])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1 re
it is really confusing! I have downloaded SDK and NDK and pointed to where these files are located while setting my environmental variables. what am I missing?
Well i have solved it in the end! And the clue was here
[aidl] /home/administrator/sdk/build-tools/19.0.1/aidl: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Explained : the Linux distro that i am working on is on a 64 bit machine so some c++ libraries were necessary to be able to run 32 bit applications so what i did is the following:
$ sudo apt-get install lib32stdc++6
and it was solved!
Related
So, I am trying to create an OTA package in AOSP and I run into this error at the very end.
2020-07-23 09:09:28 - common.py - INFO : using prebuilt boot.img from IMAGES...
2020-07-23 09:09:28 - common.py - INFO : boot size (13910016) is 20.73% of limit (67108864)
2020-07-23 09:09:29 - ota_from_target_files.py - ERROR :
ERROR:
Traceback (most recent call last):
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2263, in <module>
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2243, in main
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1986, in GenerateNonAbOtaPackage
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 884, in WriteFullOTAPackage
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1332, in FinalizeMetadata
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 1318, in ComputeAllPropertyFiles
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 495, in SignOutput
File "/home/shen/android-11/out/host/linux-x86/bin/ota_from_target_files/common.py", line 1898, in SignFile
proc.returncode, stdoutdata))
ExternalError: Failed to run signapk.jar: return code 1:
Error: Unable to access jarfile out/host/linux-x86/framework/signapk.jar
Compressing system.new.dat with brotli
Compressing vendor.new.dat with brotli
09:09:30 ninja failed with: exit status 1
#### failed to build some targets (01:44 (mm:ss)) ####
I checked and there is no signapk.jar created in the out directory.
I found the answer in case anybody face it in future. Building the signapk.jar separately fixes the issue. So do a make signapk.jar
I am unable to compile a distribution for android when i include pyserial in the python for android build requirements.
I am using the ubuntu kivy vm supplied from the kivy website.
After running the following command:
./distribute.sh -m "pil kivy pyjnius pyserial"
It compiles all the packages except the last one (pyserial) and I get this error:
Installing collected packages: pyserial Running setup.py install for
pyserial
changing mode of build/scripts-2.7/miniterm.py from 664 to 775
changing mode of /tmp/tmp0r9vlU/bin/miniterm.py to 775 Successfully installed pyserial Cleaning up... Exception: Traceback
(most recent call last): File
"/home/kivy/android/python-for-android/build/venv/local/lib/python2.7/site-packages/pip/basecommand.py",
line 122, in main
status = self.run(options, args) File "/home/kivy/android/python-for-android/build/venv/local/lib/python2.7/site-packages/pip/commands/install.py",
line 311, in run
os.path.join(options.target_dir, item) File "/usr/lib/python2.7/shutil.py", line 291, in move
raise Error, "Destination path '%s' already exists" % real_dst Error: Destination path
'/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/pyserial-2.7-py2.7.egg-info/pyserial-2.7-py2.7.egg-info'
already exists
Storing debug log for failure in /home/kivy/.pip/pip.log
Any help solving this would be appreciated.
I have solved this after a bit of checking the error log.
I will list it here in case someone has the same problem.
The following line:
Error: Destination path
'/home/kivy/android/python-for-android/build/python-install/lib/python2.7/site-packages/pyserial-2.7-py2.7.egg-info/pyserial-2.7-py2.7.egg-info'
already exists
indicates that the directory mentioned should be deleted, but this does not not help. Running the build script after deleting it generates the same error.
The solution was to also delete the directory named "serial" which can also be found in the "site-packages" directory.
I try to compile a basic code with buildozer. At first run it installs depencies and fail. Later runs it just fails.
any help needed desperately.
Thanks in advance.
BUILD FAILED
/home/mbp/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:645: The following error occurred while executing this line:
/home/mbp/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:651: null returned: 127
Total time: 1 second
form/python-for-android/dist/sozluk/private/lib/python2.7/site-packages/kivy/modules/inspector.pyo
...
.....
...
assets/private.mp3: /home/mbp/build/.buildozer/android/platform/python-for-android/dist/sozluk/private/lib/python2.7/lib-dynload/_io.so
assets/private.mp3: /home/mbp/build/.buildozer/android/app/sitecustomize.pyo
assets/private.mp3: /home/mbp/build/.buildozer/android/app/main.pyo
assets/private.mp3: /home/mbp/build/.buildozer/android/app/sozluk.kv
Traceback (most recent call last):
File "build.py", line 412, in <module>
make_package(args)
File "build.py", line 336, in make_package
subprocess.check_call([ANT, arg])
File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
# Command failed: /usr/bin/python build.py --name DenemeSozluk --version 1.2.0 --package bs.sozluk.sozluk --private /home/mbp/build/.buildozer/android/app --sdk 14 --minsdk 8 --orientation sensor debug
Fedora release 20 (Heisenbug)
I found following question about very similar problem on ubuntu. It might not be distro specific.
Build Error while converting python file into apk using buildozer
Linux localhost.localdomain 3.12.9-301.fc20.x86_64 #1 SMP Wed Jan 29 15:56:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Full output:
http://paste.fedoraproject.org/82968/41173791/
This is a very generic error, it could mean a lot of things.
One thing to check is that you have buildozer's dependencies installed...in particular, I think the lack of a jdk (and javac) can cause this. Do you have these?
I recently faced this error and from github found that it happened because google has updated their sdk version to 24.So my quick fix in buildozer was to set following property in buildozer.spec and my app worked fine afterwards.
# (int) Android SDK version to use
android.sdk = 24
while running kivy, I am getting this error. I have already ant installed.
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
can anyone tell me why this error comes? due to python or ant or any thing else?
I got this error, but the real error was slightly above this:
Buildfile: /Users/rallen/Documents/Devel/python/kivy/python-for-android/dist/default/build.xml
BUILD FAILED
/Users/rallen/Documents/Devel/python/kivy/python-for-android/dist/default/build.xml:6: **Source resource does not exist: /Users/rallen/Documents/Devel/python/kivy/python-for-android/dist/default/project.properties**
Total time: 0 seconds
Traceback (most recent call last):
File "./build.py", line 412, in <module>
make_package(args)
File "./build.py", line 336, in make_package
subprocess.check_call([ANT, arg])
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ant', 'debug']' returned non-zero exit status 1
Googling a bit, I found
https://groups.google.com/forum/#!topic/kivy-users/igYampuxxCU
which said to just create dist/default/project.properties and put
target=android-14
in that file. I actually used android-19, but that has gotten me past this issue.
Probably you need to install 32 bit libraries.
For example, I needed to install lib32-glibc,lib32-libstdc++5 and lib32-zlib from [multilib] on Arch Linux.
Trying to run forge run android command and getting this error even though file is present (Ubuntu 12.04). Even if I do not specify the sdk path and allow forge to download it on its own, I am still getting the same error.
2012-07-04 15:08:36,414 [ DEBUG] Exception running detached command:
/home/rockyj/Apps/android-sdk-linux/platform-tools/adb start-server:
[Errno 2] No such file or directory while running
run_android(('/home/rockyj/Workspace/Projects/greeter/development',
u'/home/rockyj/Apps/android-sdk-linux', None, True, None), {})
2012-07-04 15:08:36,417 [ ERROR] Something went wrong that we didn't expect:
2012-07-04 15:08:36,417 [ ERROR] Exception running detached command:
/home/rockyj/Apps/android-sdk-linux/platform-tools/adb start-server:
[Errno 2] No such file or directory
2012-07-04 15:08:36,417 [ DEBUG] Traceback (most recent call last):
File "/home/rockyj/Apps/forge-tools/forge/async.py", line 87, in run
result = self._target(*self._args, **self._kwargs)
File "/home/rockyj/Apps/forge-tools/forge/main.py", line 388, in run
build_to_run=build_to_run,
File "/home/rockyj/Workspace/Projects/greeter/.template/generate_dynamic/customer_goals.py",
line 120, in run_app
build_to_run.run()
File "/home/rockyj/Workspace/Projects/greeter/.template/generate_dynamic/build.py",
line 338, in run
self._run_task(func_name, args, kw)
File "/home/rockyj/Workspace/Projects/greeter/.template/generate_dynamic/build.py",
line 293, in _run_task
self.tasks[func_name](self, *args, **kw)
File "/home/rockyj/Workspace/Projects/greeter/.template/generate_dynamic/android_tasks.py",
line 588, in run_android
run_detached([path_info.adb, 'start-server'], wait=True)
File "/home/rockyj/Workspace/Projects/greeter/.template/generate_dynamic/android_tasks.py",
line 377, in run_detached
raise ShellError(message="Exception running detached command: %s"
% full_command, output=str(output))
ShellError: Exception running detached command:
/home/rockyj/Apps/android-sdk-linux/platform-tools/adb start-server:
[Errno 2] No such file or directory
Please help.
Thanks.
Per the comments, this issue was fixed by installing ia32 libs on Ubuntu.