problem running hello world app!

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

problem running hello world app!

Postby adil » Mon Aug 08, 2011 4:09 am

Hey... i'm a beginner in android development. I started with hello world app, but i get the following error-
[2011-08-08 07:56:36 - bucky] ------------------------------
[2011-08-08 07:56:36 - bucky] Android Launch!
[2011-08-08 07:56:36 - bucky] adb is running normally.
[2011-08-08 07:56:36 - bucky] Performing com.infinity.android.adil.BuckyActivity activity launch
[2011-08-08 07:56:36 - bucky] Automatic Target Mode: Preferred AVD 'Adils_AVD' is not available. Launching new emulator.
[2011-08-08 07:56:36 - bucky] Launching a new emulator with Virtual Device 'Adils_AVD'
[2011-08-08 07:56:39 - Emulator] invalid command-line parameter: Files.
[2011-08-08 07:56:39 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-08 07:56:39 - Emulator] please use -help for more information

I'm using eclipse IDE in Windows. Please Help.
adil
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Aug 08, 2011 3:55 am

Top

Re: problem running hello world app!

Postby techkanika » Mon Aug 08, 2011 11:39 am

hello adil,

can you please share your code.. so that we can figure out the problem..

Kanika
Thanks
Kanika Rakheja
User avatar
techkanika
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Fri May 28, 2010 7:49 am

Re: problem running hello world app!

Postby heinemann » Tue Aug 09, 2011 11:35 pm

Im having this same problem, just so you can see some code mine is

_______________________________________________________________

package com.example;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorldActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
}
}


this is followed by the information from the OP except that mine says,

[2011-08-09 17:32:34 - Hello World] ------------------------------
[2011-08-09 17:32:34 - Hello World] Android Launch!
[2011-08-09 17:32:34 - Hello World] adb is running normally.
[2011-08-09 17:32:34 - Hello World] Performing com.example.HelloWorldActivity activity launch
[2011-08-09 17:32:34 - Hello World] Automatic Target Mode: launching new emulator with compatible AVD 'my_avd'
[2011-08-09 17:32:34 - Hello World] Launching a new emulator with Virtual Device 'my_avd'
[2011-08-09 17:32:34 - Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.
[2011-08-09 17:32:34 - Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.
[2011-08-09 17:32:34 - Emulator] please use -help for more information

the difference is on the "Emulator] invalid command-line parameter: Files\Andriod\android-sdk\tools/emulator-arm.exe

Im wondering if this is the problem if so how do I fix?? Is Eclipse not configured right with Andriod??
heinemann
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Aug 09, 2011 11:29 pm

Re: problem running hello world app!

Postby mayooresan » Wed Aug 10, 2011 6:15 am

This is problem because of your android path u set in the preferences page. If your path to SDK directory contains then this issue occures. This is a bug you can get an alternative path via command prompt without space.
something like this "C:\PROGRA~2\Android\android-sdk\SDK Manager"

If you don't know the 8-dot-3 name of your desired path, just fire up a Command Prompt and execute "DIR /X"... the short name will be displayed next to each directory.

Thats how it worked for me.
mayooresan
Freshman
Freshman
 
Posts: 3
Joined: Tue Aug 09, 2011 5:17 pm

Re: problem running hello world app!

Postby techkanika » Wed Aug 10, 2011 6:51 am

hi,

mayooresan is right.. you can also refer the following link to get complete information.

http://stackoverflow.com/questions/6638713/android-emulator-is-not-starting-showing-invalid-command-line-parameter

kanika
Thanks
Kanika Rakheja
User avatar
techkanika
Experienced Developer
Experienced Developer
 
Posts: 83
Joined: Fri May 28, 2010 7:49 am

Re: problem running hello world app!

Postby cyrus.phil.andev » Sun Aug 14, 2011 11:18 am

I run into the same problem before. What I did was to reinstall the SDK and download the platform. Instead of using the default directory, I use C:\Android\android-sdk. i use the same code above when i compile. But I don't see the "Hello, Android" text. Iam using Windows 7 Starter. And, Eclipse Indigo. I tried the command line approach of loading apk file unto the emulator but same result....here the command,,,run it in the tools dir. C:\Android\android-sdk\platform-tools>adb -s emulator-5554 install C:\Users\cyrus\workspace\HelloWorld\bin\HelloWorld.apk
cyrus.phil.andev
Freshman
Freshman
 
Posts: 7
Joined: Sun Aug 14, 2011 11:00 am

Top

Re: problem running hello world app!

Postby cyrus.phil.andev » Sun Aug 14, 2011 12:22 pm

Looks like I figure it out. Just navigate thru (in the emulator UI) the menu to run "HelloWord" App. I can see the "Hello,Android" text now : )
cyrus.phil.andev
Freshman
Freshman
 
Posts: 7
Joined: Sun Aug 14, 2011 11:00 am

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 12 guests