Python Android Development - android

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. :)

Related

Run XSLT-script on android smartphone and/or tablet

I have a relatively simple question:
Is there a possibility to run an xslt-script on an android device? I have an .xml file, using a .xsl script to create a new .xml file.
On windows I am using saxon, which works good, but as I don´t have always access to it I would prefer to run a script on my android phone and/or android tablet.
I did some research with google and also on this site, but i didn´t found any clear answer.
thanks in advance and greetings
I have now found a way to run both Saxon-JS 2 or rather its command line tool xslt3 as well as Saxon HE Java from a command line terminal for Android.
I installed Termux, I had to use the version from F-Droid, as the one on the Google play store seems to be no longer supported, then in the Termux terminal shell I installed node and java (try to run with e.g. ˋnodeˋ and it will tell you the ˋpkg install ...ˋ command line to install, then I did e.g. ˋnpm install -g xslt3ˋ to install Saxon-JS's command line tool and downloaded the Saxon HE 11.2 Java zip from Sourceforge with wget and unzipped it and finally I am able to run e.g. xslt3 to run Saxon-JS or java -jar path-to-saxon11jar to run XSLT 3 (or in the case of Saxon Java of course XQuery too.
The interaction with the rest of the Android file system is a bit complicated to find out but the Linux Terminal shell has its own file system with a storage folder with sub folders like storage/download linked to the usual download folder other Android apps (e.g. your browser) use.
Here is a screenshot of Termux on my Android tablet showing the execution of Saxon HE 11 Java and Saxon-JS 2: .
It turns out the same procedure doesn't work quite as well on my Android phone which has Android 12 as the running Java and therefore Saxon HE 11 or any other Saxon Java HE currently does not work due to a known issue https://github.com/termux/termux-packages/issues/7332. But Node.js and npm and therefore Saxon-JS with xslt3 run fine on that phone.

running a dart project on an android tablet with termux

i have to make a roundtrip, some hours in the train, and thought i could do some work, on an android tablet....
i have termux installed, there i installed dart, git-cloned my (working) repo, but the tests fail with :
~/projects/dart_fibu$ dart test test/settings_test.dart
00:02 +0: loading test/settings_test.dart
Could not find a command named
"/data/data/com.termux/files/usr/lib/dart-sdk/bin/snapshots/frontend_server.dart.snapshot".
program itself runs fine, but since i use the tests to dev the thing...
wondering what's going wrong there, and how to fix this?
the project was started as command line project and then imported into android studio, it runs fine on my main dev machine and on a raspberry pi...
i googled, but didn't find anything relevant
but... in the termux install there seems to be more stuff missing:
when i run vim (with the dart plugins activated) i get also a missing analysis_server.dart.snapshot error....

Buildozer building an Android Kivy app returns Command failed

I'm creating an app in Kivy and tried to build it on a Buildozer virtual machine.
I followed this tutorial to set it up. Running the buildozer android debug command returns this error.
I am not very experienced in Ubuntu so I've hit a wall.
sf_WKND is the shared folder where main.py is stored along with everything else. I haven't altered the buildozer.spec file except for log_level=2.
In dependencies I used the Android on Ubuntu 16.04 (64bit) commands. (Which I'm not sure is even correct, I don't have a clue which one to use so I figured the latest one)
If anyone ever visits here having the same problem - all I had to do was move the project folder to the VM (I moved it to Desktop). Shared folders was somehow messing it up.

Debugging a Kivy android app using BlueStacks

I'm building my apk using Buildozer in Ubuntu. But I am more comfortable using BlueStacks in Windows for the testing purpose. My app crashes after it starts with no apparent signals. How can I debug it using BlueStacks?
There's a debug tool with file name: HD-Adb.exe in Program Files (Program Files (x86) in Win64) path of BlueStacks. When you run this tool, you could see all what happens behind the android emulator. It's easy to debug your app then. To run the tool open command line in Windows and type the following lines:
> cd "c:\Program Files (x86)\BlueStacks"
c:\Program Files (x86)\BlueStacks>HD-Adb.exe logcat
I really had hard time trying android sdk emulator and other things. But this works great! Enjoy debugging.

Configuring Android to use in terminal for Linux Mint

I am currently using Eclipse to develop Android apps. Following the Android Developer tutorial, they had the option to program using the command line. I am interested in doing it this way but ran into a number of errors. I have tried several solutions available on the internet and I fear that I might have added to many things on my PATH file. None of the solutions have worked for me.
I am very lost with all these directories. Please help for Linux Mint specific distribution.
Key errors to address are:
android: command not found
and
ant debug
Buildfile: build.xml does not exist!
Build failed
I downloaded adt-bundle-linux-x86-20130717.
Update:
I think I managed to get the android command working by hardcoding the following on my bash.bashrc:
/etc/.../sdk/tools
/etc/.../sdk/platform-tools
Please let me know if it is recommended to do this another way.
However, ant debug is still not working.
If ADB is properly in your path, the android command should launch the SDK updater. Here is what I have in my .bashrc
# SDK
PATH=${PATH}:~/android-sdk/tools
PATH=${PATH}:~/android-sdk/platform-tools
You put the environment variable configuration in which files? configuration is completed, use the source command to run the file, or try to restart the computer

Categories

Resources