views:

151

answers:

1

Hi i download Android 2.2 SDK and install nbandroid plugin on netbeans. when i run project i get this message on netbeans out put and emulator did not start !!!

init: deps-jar: Compiling 1 source file to C:\Users\mahdi\Documents\NetBeansProjects\Hello Android\build\classes compile: =C:\Users\mahdi\Documents\NetBeansProjects\Hello was unexpected at this time. C:\Users\mahdi\Documents\NetBeansProjects\Hello Android\nbproject\build-impl.xml:411: exec returned: 255 BUILD FAILED (total time: 2 seconds)

and this is my code :

package org.me.helloandroid;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;


public class MainActivity extends Activity {


@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);

    TextView tv = new TextView(this);
    tv.setText("Hello World");
    setContentView(tv);
}

}

can any body help me thanks

+1  A: 

1st hint: Avoid spaces in the Project name! This is something you could have seen yourself:

\NetBeansProjects\Hello was unexpected 

A partial file-name in an error message which un-expectantly ends at the first space is a dead give away for a tool which does not support spaces in file names.

That you haven't spotted it yourself leads me to a 2nd advice:

2nd hint: Use Eclipse for Android development.

Martin
your right , thanks
mahdi