user1687239
user1687239

Reputation: 11

python scripting for android

I am trying to use eclipse and sl4a to create an android app for my tablet. I am following the procedure mentioned in this blog.

http://jokar-johnk.blogspot.com/2011/02/how-to-make-android-app-with-sl4a.html

  1. I have my python scripts already compiled.

  2. I need to make a '.apk' file using these python scripts, such that when I run the app in android, it should do what it is supposed to.

  3. To create the '.apk' file, I am using eclipse with pydev plugin.

  4. I created a clone of sl4a repository and imported to eclipse.

  5. When I am creating a new project for android app development, I am not sure where to import my python scripts and embed them such that, at last I have an executable '.apk' file.

  6. When I create a new project in eclipse, I see couple of folders like src, gen, res and several files under them. Where do I need to place my python scripts now? Do I need to create a separate folder under the project and directly import my python scripts or put them under src/gen/res?

Upvotes: 1

Views: 842

Answers (1)

Grace B
Grace B

Reputation: 1406

As it says in that guide, you don't create a new project, you make a copy of the ScriptForAndroidTemplate template app, then:

"Right click on your_script_name then open with text editor. Delete the default script, replace it with your own and save. Then Clean/Build/Refresh your project and run it."

And it should work!

Re-read (and follow) the tutorial if you're still stuck. Good luck!

Upvotes: 1

Related Questions