I am trying to build my app using kivy, and it is looking great so far. Everything compiles and runs just fine with buildozer.
I am trying to incorporate ads into my app with AdBuddiz according to this website
https://github.com/kivy/kivy/wiki/AdBuddiz-Android-advertisements-integration-for-Kivy-apps
I am stuck in 4th step, as I it gives the error that says
jnius.jnius.JavaException: javaclass definition missing
I installed jnius by downloading this
https://github.com/kivy/pyjnius
and used the command: sudo python setup.py install
If you could help me fix this error or help me understand the error, I would appreciate so much.
Thank you.
The adbuddiz code won't run on the desktop, you have to run this stuff on the Android device. If you want to run the program without it on linux, put it in an if statement that checks kivy.platform.
Related
I think i can use PyInstaller in Android just like use it in PC, but i run the following command:
pip install pyinstaller
in pydroid3, i got an error:
Failed to build wheel for pyinstaller
And then, i note pydroid teminal tell me current pip is too old, but i update the pip with teminal recommanded command, i got another error:
pyinstaller does not support Android yet
Sombody has any idea about this error, or anyone can tell me another solution about packing an exe which coding by pydroid3 as apk to released?
I've made an app using kivy and python 3.7, on OSX. It runs quite well within the PyCharm environment. However, buildozer keeps throwing up errors when I try to compile the app with buildozer.
I have installed the latest buildozer using the pip3.7 command. I have even updated python-for-android to test it out. I am also currently using the Android NDK r19c, although I have tried it with r17c and r20. Neither have worked.
Originally, I had errors relating to the use of pip, instead of pip3.7, since buildozer would try to use python 2.7 in some areas. This was solved by uninstalling buildozer etc. and reinstalling with pip3.7. Those errors have gone but at the moment, I seem to be getting new errors, related to 'Silex' and pypandoc, which is strange since I don't believe buildozer even uses those.
The error codes have too many characters to allow me to post them directly here, so please see the error codes as a page on my website. The links are below:
https://apilotslens.com/buildozer-silex-error
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
https://apilotslens.com/buildozer-pypandoc-error
Even when I install pypandoc, the error keeps appearing.
I am very confused at this point. I have supposedly done everything by the book, so that buildozer will compile my APK. I really hope someone can help me. As far as I am aware, Buildozer doesn't even use Silex or pypandoc, so why would they be appearing? They haven't even been mentioned before. I really want to get this sorted soon.
Thanks in advance!
I'm pretty sure I haven't touched the file manually at all. The only thing I have tried is a clean: buildozer android clean but that hasn't got it working.
This only cleans the build, not the full cache. Delete /Users/JGolding/Desktop/FlightPlanningApp/PythonCode/Drafts/Draft1/.buildozer and try again.
Wait, do you mean shlex or silex?
It should read import shlex. Your file reads import silex.
Here's the link to the toolchain.py file you mentioned:
This looks good except for the shlex->silex change.
I thought I'd try uninstalling and reinstalling buildozer (pip3.7 uninstall buildozer) but interestingly, it says Can't uninstall 'buildozer'. No files were found to uninstall.
This is something unrelated arising from your pip invocation targeting the wrong directory or something.
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
This is also unrelated, it's just that the silex module doesn't support python 3. The silex module was always a red herring, it's just the letter switch in your copy of toolchain.py that is wrong.
Note that if you read the error, it isn't complaining about pypandoc but about SyntaxError: Missing parentheses in call to 'print'..
I'm trying to run a simple hello world app as a start of python in android,im an intermediate in python,never tried python in android but i want to run it in my phone, but i've tried, researched, i've installed kivy, and all its requirements in its original website, my main error is down below, im on windows 10, and i try this apt,sudo and dpkg thing none of them are recognized as an internal or external command(i do these in command prompt, should i not?),i have the buildozer.spec file in lib but couldnt find a way to edit, i've also tried other ways im really stuck here, my android version is 5.0.1 if that helps, please help im stuck.
C:\Program Files\Python37\Lib>buildozer android debug deploy run
I Check configuration tokens
[91m[1mBuildozer is running as root![0m
[91mThis is [1mnot[0m [91mrecommended, and may lead to problems
later.[0m
Are you sure you want to continue [y/n]? y
Unknown command/target android_old
You should download the kivy virtual machine at https://kivy.org/#download (It's at the bottom). Import the machine into virtualbox. If you don't have virtualbox installed, you can download it at https://www.virtualbox.org/wiki/Downloads. Get your application files into the virtual machine, and run buildozer init in your project directory. Edit the buildozer.spec file, and run buildozer -v android debug.
Worked for me. Hopes this helps. :)
The error I get is in this part:
running: '"C:\apache-ant-1.9.4\bin\ant" clean debug -f C:\Users\Robert\Desktop\N
ormero\Games\Aztec\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="C:\a
ndroid-sdk"'
The filename, directory name, or volume label syntax is incorrect.
Error running command, return code: 1
I'm running:
cocos run -p android
On windows 7 64bit. I have googled but I'm stumped. Also I'm not a genius in Java nor Android, hence I use Cocos JS.
EDIT: Someone pointed out to me that the dot (.) in proj.android might be causing the issue. Any way I can fix this easily?
EDIT2: It happens during the compile, but the weird thing is, I can execute the command it says it errors on, and then it goes BUILD SUCCESFUL.
Your python version is not suitable. reinstall python 2.7.5
and it will be work =)
I faced the exact same issue then searched and found that "The filename, directory name, or volume label syntax is incorrect" error message is probably related to Python.
The filename, directory name, or volume label syntax is incorrect
I have both Python 2 and 3 in my machine but my PATH is pointing to 2.7.0 due to failsafe setup for some node.js projects. Then I reviewed the release note of Python 2.7 below:
https://hg.python.org/cpython/raw-file/v2.7.12/Misc/NEWS
And found there are numerous issues are associated with path. Without touching cocos2d first, I decided to remove 2.7.0 and installed 2.7.8. (just an old binary)
The propblem was solved immediately.
(Thanks justderb to remind and more details are provided.)
I have been using Monkey runner to automate applications. My script is working fine . But following are the constraints.
While running complete script application is crashing and showing Force Close.
How to check command is working fine.
I tried using getproperty(). It is not getting updated as and when application is working.
Please reply.
Thanks is Advance
To check that my program worked when using monkeyrunner I normally save the log and write a python program that looks over it once my monkeyrunner script is finished working.
If you want to put more work into things you could also use python's subprocess module and adb to look at the log while your program runs.