0

sl4a installed successfully, installed also Python for Android. But i have an script that i can not run via sl4a.

It opens sl4a and in scripts i can see py file when i press on it sl4a just exits. It does not show 5 buttons to run in terminal or something.

Installed TaskBomb for running sl4a scripts. and it does work but output is:

Traceback (most recent call last): File "path/to/myscript.py", line 3, in droid = android.Android() NameError: name 'android' is not defined

I am using Android Box g-box mx. On my samsung galaxy s4 installed exactly same way and same apps (sl4a and python for android) and it works flawless.

What it could be an issue?

Thanks for any replies.

  • Could you show the first few lines of mysript.py? particularly those surrounding line 3? Does the script include the relevant libraries? – EWit Sep 22 '14 at 14:18
  • import android #sl4a to view page droid = android.Android() droid.view(url) – Ziomuś Gorliczanin Sep 22 '14 at 14:42
  • @EWit Thanks for reply i have got it working i had an empty space by mistake. before importing android module, but... i still needed to install that TaskBomb to run scripts, in my Samsung it shows me 5 buttons to run in terminal, or edit or something else, but none of scripts work inside of sl4a when i click on it it just exits without notification. Its fully rooted android box. (BTW How can i add created scripts as shortcut on Launcher(Desktop as icons in windows?) to just click on it and let it run? any ideas? – Ziomuś Gorliczanin Sep 22 '14 at 19:01

0 Answers0