O'Reilly Forums: Chapter 8 - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 8 Problem with transferring my script to emulator...

#1 User is offline   iSpikeyBoy 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 08-April 11

Posted 12 April 2011 - 11:00 AM

I'm having trouble transferring my script to the emulator as instructed on page 264.

It appears that I don't have "/sdcard/s14a/scripts" directory in my "android-sdk-linux_x86" directory. Am I supposed to have that directory in there?

I'm using Ubuntu linux operator system...
0

#2 User is offline   paulbarry 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 251
  • Joined: 20-August 09

Posted 12 April 2011 - 11:09 AM

Be sure to use a lowercase "L" when typing in "sl4a". Also, note that you are copying from your computer (which is running Ubuntu Linux) onto the emulator (which is also running a version of Linux). The "/sdcard/sl4a/scripts" directory location is on the emulator and this directory has no relationship to any similar directory location on your Ubuntu system.

Hope this helps.

--Paul.
0

#3 User is offline   iSpikeyBoy 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 08-April 11

Posted 12 April 2011 - 11:59 AM

Oh, thank you for correcting my mistake... Just fixed it and tried again. Still doesn't work...

I placed the mydroidtest.py within the "android-sdk-linux_x86" directory, then I opened the terminal within that directory and typed "platform-tools/adb push mydroidtest.py /sdcard/sl4a/scripts" then I got that result "1 KB/s (107 bytes in 0.090s)" on the terminal. Then I checked the emulator and it says "No matches found" under Scripts in SL4A app. I've even push "Refresh" under Menu->Refresh and reboot the emulator. No script shown yet.

See where I'm at?

Attached thumbnail(s)

  • Attached Image: screenshot.jpg

0

#4 User is offline   iSpikeyBoy 

  • New Member
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 08-April 11

Posted 12 April 2011 - 01:29 PM

Update: Please disregard my previous message. I just realized that I've forgotten to click the "Python for Android" app and click install. After it's installed, the scripts are on the list under "Scripts" for SL4A app.
0

#5 User is offline   Dharmit 

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 25-July 11

Posted 25 July 2011 - 02:23 AM

I copied the script by following the command given at the bottom of Page 264. But the script doesn't show up in the list when I load the sl4a application in the emulator.

Moreover, I don't get any list of scripts when the sl4a application got loaded for the first time. But as per Scripts section on Google Code, it's not a major issue.
0

#6 User is offline   Dharmit 

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 25-July 11

Posted 25 July 2011 - 03:50 AM

 Dharmit, on 25 July 2011 - 02:23 AM, said:

I copied the script by following the command given at the bottom of Page 264. But the script doesn't show up in the list when I load the sl4a application in the emulator.

Moreover, I don't get any list of scripts when the sl4a application got loaded for the first time. But as per Scripts section on Google Code, it's not a major issue.


Well it lists the scripts now. I didn't click on Install on the top of the window after opening Python for Android.
0

#7 User is offline   helenb 

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 12-July 11
  • Gender:Male

Posted 14 September 2011 - 03:49 AM

Hi, I'm having problems with this step too.

The pre-loaded scripts are appearing in the sl4A app, the emulator's running and I'm executing the command in the android-sdk/platform-tools folder (Windows 7).

I type:
platform-tools\adb push mydroidtest.py \sdcard\sl4a\scripts

..and get the error:
failed to copy 'mydroidtest.py' to '\sdcard\sl4a\scripts': Read-only file system.

I've saved mydroidtest.py into the android-sdk folder and checked it isn't set as read-only.

What am I doing wrong?
0

#8 User is offline   helenb 

  • New Member
  • Pip
  • Group: Members
  • Posts: 7
  • Joined: 12-July 11
  • Gender:Male

Posted 16 September 2011 - 04:49 AM

Finally managed to overcome this after deleting and re-creating the emulator a couple of times.
0

#9 User is offline   ankitbansal1 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 19-January 12

Posted 19 January 2012 - 07:11 AM

While copying the py file to "sdcard" I am getting permission denied error.
I am running on a Windows Xp system.
Please help me.
0

#10 User is offline   AndrewGLK 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 29-March 12

Posted 29 March 2012 - 12:57 AM

To helenb & ankitbansal1:

Try using the Forward-Slash '/' for the path.

platform-tools\adb push mydroidtest.py /sdcard/sl4a/scripts

Back-Slash '\' is only used in Windows. Other systems (Unix based) usually used Forward-Slash '/'.

Hope this help.
0

#11 User is offline   leo168 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 03-November 12

Posted 03 November 2012 - 03:04 AM

I'm using win7 and I have a problem to copy my script to the emulator. There is always an error:device not found. Can you help me?
0

#12 User is offline   paulbarry 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 251
  • Joined: 20-August 09

Posted 03 November 2012 - 03:09 AM

Hi leo168.

Can you include a screen-shot showing the message that you are getting (pressing Alt+PrintScn on Windows should pop the current screen contents into the clipboard)? Also, what command are you typing in?

--Paul.
0

#13 User is offline   leo168 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 03-November 12

Posted 03 November 2012 - 10:16 AM

View Postpaulbarry, on 03 November 2012 - 03:09 AM, said:

Hi leo168.

Can you include a screen-shot showing the message that you are getting (pressing Alt+PrintScn on Windows should pop the current screen contents into the clipboard)? Also, what command are you typing in?

--Paul.


hi paul,
here is the screenshot including the code
thanks for supporting
leo
Attached Image: Unbenannt.PNG
0

#14 User is offline   paulbarry 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: O'Reilly Author
  • Posts: 251
  • Joined: 20-August 09

Posted 04 November 2012 - 10:01 AM

Is the emulator actually running?

--Paul.
0

#15 User is offline   leo168 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 03-November 12

Posted 05 November 2012 - 09:16 AM

 paulbarry, on 04 November 2012 - 10:01 AM, said:

Is the emulator actually running?

--Paul.

Thanks. I've forgotten that. It runs now.
leo
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users