buildozer/Kivy NONETYPE splitlines error - android

When I try to compile my APK in the VM version of Buildozer I am getting this error.
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 11, in <module>
load_entry_point('buildozer==0.33', 'console_scripts', 'buildozer')()
File "/usr/local/lib/python2.7/dist-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 1058, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 91, in run_commands
func(args)
File "/usr/local/lib/python2.7/dist-packages/buildozer/target.py", line 101, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python2.7/dist-packages/buildozer/__init__.py", line 176, in prepare_for_build
self.target.install_platform()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 470, in install_platform
self._install_android_packages()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 407, in _install_android_packages
packages = self._android_list_sdk()
File "/usr/local/lib/python2.7/dist-packages/buildozer/targets/android.py", line 336, in _android_list_sdk
for x in available_packages.splitlines()
AttributeError: 'NoneType' object has no attribute 'splitlines'
I have not found an answer anywhere that relates to this issue. Thanks for your help.

Related

buildozer error UnicodeEncodeError: 'latin-1' in any project

i get same problem in any project:
Traceback (most recent call last):
File "/usr/local/bin/buildozer", line 33, in <module>
sys.exit(load_entry_point('buildozer==1.4.1.dev0', 'console_scripts', 'buildozer')())
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/__init__.py", line 1024, in run_command
self.target.run_commands(args)
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/target.py", line 93, in run_commands
func(args)
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/target.py", line 103, in cmd_debug
self.buildozer.prepare_for_build()
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/__init__.py", line 180, in prepare_for_build
self.target.compile_platform()
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/targets/android.py", line 841, in compile_platform
self._p4a(p4a_create, get_stdout=True)[0]
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/targets/android.py", line 133, in _p4a
return self.buildozer.cmd([*self._p4a_cmd, *cmd, *self.extra_p4a_args], **kwargs)
File "/usr/local/lib/python3.10/dist-packages/buildozer-1.4.1.dev0-py3.10.egg/buildozer/__init__.py", line 316, in cmd
stdout.write(chunk.decode('utf-8', 'replace'))
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 7616-7677: ordinal not in range(256)
try remove .buildozer and other folders and buld again
SOLVED!
dpkg-reconfigure locales
add RU-ru.UTF8 and EN-en.UTF8 locales solve this issue!

Error at the end when compiling android (crdroid)

Compiled crdroid, device cereus android 11. At the very end of the compilation an error popped up:
The beginning of the error (the rest is not interesting)
FAILED: out/target/product/cereus/lineage_cereus-ota-eng.alexander.zip out/target/product/cereus/ota_metadata
/bin/bash -c "PATH=out/host/linux-x86/bin/:system/extras/ext4_utils/:\$PATH out/host/linux-x86/bin/ota_from_target_files --verbose --extracted_input_target_files out/target/product/cereus/obj/PACKAGING/target_files_intermediates/lineage_cereus-target_files-eng.alexander --path out/host/linux-x86 --backup=true -k build/make/target/product/security/testkey --output_metadata_path out/target/product/cereus/ota_metadata out/target/product/cereus/obj/PACKAGING/target_files_intermediates/lineage_cereus-target_files-eng.alexander.zip out/target/product/cereus/lineage_cereus-ota-eng.alexander.zip"
2022-01-22 19:44:39 - common.py - WARNING : Failed to read SYSTEM/etc/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read VENDOR/etc/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read VENDOR/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read PRODUCT/etc/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read PRODUCT/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read SYSTEM_EXT/etc/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read SYSTEM_EXT/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read ODM/etc/build.prop
2022-01-22 19:44:39 - common.py - WARNING : Failed to read ODM/build.prop
end of error
2022-01-22 19:44:42 - blockimgdiff.py - INFO : Finding transfers...
Traceback (most recent call last):
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/__main__.py", line 12, in <module>
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 174, in _run_module_as_main
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/internal/stdlib/runpy.py", line 72, in _run_code
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2333, in <module>
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2312, in main
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 2052, in GenerateNonAbOtaPackage
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 774, in WriteFullOTAPackage
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/ota_from_target_files.py", line 689, in GetBlockDifferences
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/common.py", line 2661, in __init__
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 342, in Compute
File "/home/alexander/crDroid/out/host/linux-x86/bin/ota_from_target_files/blockimgdiff.py", line 1561, in FindTransfers
AssertionError
19:44:42 ninja failed with: exit status 1
#### failed to build some targets (16:19 (mm:ss)) ####
As I understand the problem in the build.prop files. in those folders (where the error can not read) they are not. What should I do to create them?
find the releasetools.py in your device tree
search for android_info add .decode('UTF-8') at the end of the line like this:
android_info = input_zip.read("OTA/android-info.txt").decode('UTF-8')

Resource Not Found Crash. The project doesn't contain references to design_ic_visibility file at all

My app has encountered a crash on some devices with ResourcesNotFoundException.
My test devices don't have such a problem, the devices that suffer the crash are Pixel 1 and Nexus 5X.
The resource ID in the message from the crash log points to design_ic_visibility and I've found it in my R file. I don't have that resource in my project, so my best bet is that it comes from some lirary.
The following lines are the long i'm referring to:
androidx.core.content.a.c()
EXCEPTION
android.content.res.Resources$NotFoundException
MESSAGE
Unable to find resource ID #0x7f08009b
EDIT:
Thanks to #Mike M. we determined it is the resource for password toggle and after looking into the event trail it does look like it.
I would appreciate an immediate solution if possible. I already submitted this info to google issue tracker but need to resolve the crash now
Event trail:
android....rcesImpl
ResourcesImpl.java line 228 in android.content.res.ResourcesImpl.getResourceName()
android....rcesImpl
ResourcesImpl.java line 687 in android.content.res.ResourcesImpl.loadDrawableForCookie()
android....rcesImpl
ResourcesImpl.java line 571 in android.content.res.ResourcesImpl.loadDrawable()
android....esources
Resources.java line 858 in android.content.res.Resources.loadDrawable()
android....pedArray
TypedArray.java line 928 in android.content.res.TypedArray.getDrawable()
android....pedArray
XResources.java line 1363 in android.content.res.XResources$XTypedArray.getDrawable()
android....Drawable
AnimatedStateListDrawable.java line 504 in android.graphics.drawable.AnimatedStateListDrawable.parseItem()
android....Drawable
AnimatedStateListDrawable.java line 453 in android.graphics.drawable.AnimatedStateListDrawable.inflateChildElements()
android....Drawable
AnimatedStateListDrawable.java line 385 in android.graphics.drawable.AnimatedStateListDrawable.inflate()
android....Inflater
DrawableInflater.java line 130 in android.graphics.drawable.DrawableInflater.inflateFromXml()
android....Drawable
Drawable.java line 1227 in android.graphics.drawable.Drawable.createFromXmlInner()
android....Drawable
Drawable.java line 1200 in android.graphics.drawable.Drawable.createFromXml()
android....rcesImpl
ResourcesImpl.java line 715 in android.content.res.ResourcesImpl.loadDrawableForCookie()
android....rcesImpl
ResourcesImpl.java line 571 in android.content.res.ResourcesImpl.loadDrawable()
android....esources
Resources.java line 771 in android.content.res.Resources.getDrawable()
android....esources
XResources.java line 790 in android.content.res.XResources.getDrawable()
android.....Context
Context.java line 525 in android.content.Context.getDrawable()
androidx...ontent.a
line 2 in androidx.core.content.a.c()
androidx...idget.l0
line 15 in androidx.appcompat.widget.l0.a()
androidx...idget.l0
line 11 in androidx.appcompat.widget.l0.a()
a.a.k.a.a
line 1 in a.a.k.a.a.c()
com.goog...Delegate
line 2 in com.google.android.material.textfield.PasswordToggleEndIconDelegate.initialize()
com.goog...utLayout
line 5 in com.google.android.material.textfield.TextInputLayout.setEndIconMode()
com.goog...utLayout
line 184 in com.google.android.material.textfield.TextInputLayout.<init>()

monkeyrunner import os arrayindexoutofboundsexception

I have the Pythonv2.6.5, Jythonv2.5.3 and ADT22.01 installed but for some reason, whether its in a python script or just from the monkeyrunner command-line, when I simply type in import os, I get an ArrayIndexOutofBoundsException. This is being run on Ubuntu 10.04 (Lucid Lynx):
$ monkeyrunner
Jython 2.5.3 (2.5:c56500f08d34+, Aug 13 2012, 14:54:35)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_26
>>> import os
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "__pyclasspath__/os$py.class", line 50, in <module>
java.lang.ArrayIndexOutOfBoundsException: 8
at org.python.objectweb.asm.ClassReader.a(Unknown Source)
at org.python.objectweb.asm.ClassReader.accept(Unknown Source)
at org.python.objectweb.asm.ClassReader.accept(Unknown Source)
at org.python.core.AnnotationReader.<init>(AnnotationReader.java:44)
at org.python.core.imp.readCode(imp.java:219)
at org.python.core.util.importer.getModuleCode(importer.java:202)
at org.python.core.util.importer.importer_load_module(importer.java:95)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:518)
at org.python.core.imp.find_module(imp.java:472)
at org.python.core.imp.import_next(imp.java:718)
at org.python.core.imp.import_module_level(imp.java:827)
at org.python.core.imp.importName(imp.java:917)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importOneAs(imp.java:954)
at os$py.f$0(/home/frank/hg/jython/jython/dist/Lib/os.py:705)
at os$py.call_function(/home/frank/hg/jython/jython/dist/Lib/os.py)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:391)
at org.python.core.util.importer.importer_load_module(importer.java:109)
at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(ClasspathPyImporter.java:63)
at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:47)
at org.python.core.imp.loadFromLoader(imp.java:518)
at org.python.core.imp.find_module(imp.java:472)
at org.python.core.imp.import_next(imp.java:718)
at org.python.core.imp.import_module_level(imp.java:827)
at org.python.core.imp.importName(imp.java:917)
at org.python.core.ImportFunction.__call__(__builtin__.java:1220)
at org.python.core.PyObject.__call__(PyObject.java:357)
at org.python.core.__builtin__.__import__(__builtin__.java:1173)
at org.python.core.imp.importOne(imp.java:936)
at org.python.pycode._pyx1.f$0(<stdin>:1)
at org.python.pycode._pyx1.call_function(<stdin>)
at org.python.core.PyTableCode.call(PyTableCode.java:165)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1275)
at org.python.core.Py.exec(Py.java:1319)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:215)
at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:89)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:70)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:46)
at org.python.util.InteractiveConsole.push(InteractiveConsole.java:110)
at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:90)
at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:60)
at com.android.monkeyrunner.ScriptRunner.console(ScriptRunner.java:193)
at com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:73)
at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:189)
java.lang.ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 8
Any ideas as to what i might've misconfigured?
fixed it by deleting the tools directory and re-copying the tools from SDK Tools v 22.01

No such file or directory : app.ap_

When i try to run my application it gives me this error.. But why ?
[ERROR] Exception occurred while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 2243, in <module>
[ERROR] s.build_and_run(True, avd_id, device_args=device_args)
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 2068, in build_and_run
[ERROR] launched, launch_failed = self.package_and_deploy()
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 1585, in package_and_deploy
[ERROR] unsigned_apk = self.create_unsigned_apk(ap_)
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 1447, in create_unsigned_apk
[ERROR] resources_zip = zipfile.ZipFile(resources_zip_file)
[ERROR] File "C:\Users\ThomasBolander\AppData\Local\Titanium Studio\plugins\com.appcelerator.titanium.python.win32_1.0.0.1338515509\python\lib\zipfile.py", line 671, in __init__
[ERROR] self.fp = open(file, modeDict[mode])
[ERROR] IOError: [Errno 2] No such file or directory: 'C:\\Users\\ThomasBolander\\Dropbox\\Praktikanten\\Apps\\Fritidsjob.dk Android Standard\\build\\android\\bin\\app.ap_'
Try the following:
Make sure that if you are using localization files, there are no errors in those.
If you are using any kind of module, make sure that module is compatible with your SDK.
Clean your solution and then run the project again.

Categories

Resources