Problem running HelloWorld (or anny sample application)

by piero...@gmail.com » Tue, 09 Jun 2009 01:18:59 GMT


Sponsored Links
 Hi,

I'm new to this group (or any google group)

I wannted to develop some apps for my phone but when i installed
eclipse, sdk, eclipse plugin (ad Path to EV), create AVD and when i
wannted to write some basic Hello World or use sample apps given with
android SDK 1.5 i just get the emulator Windows saing "ANDROID_" and
that's it. I don't know what to do ... any help ?

I tried to run it on :

Windows XP SP3 eclipse 3.4 SDk 1.5
OSX 1.5.5 eclipse 3.4 SKD 1.5

Plase can anyone tell me what am i doing wrong ?

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Any plans to make a DownloadManager library/jar available for pre-Gingerbread support?

I would love to take advantage of the new DownloadManager introduced in 
Gingerbread, but since I'm aiming to keep my app cupcake-compatible, this is 
quite problematic.

Are there any plans to make a library available for pre-Gingerbread support? 
If not, are there any known technical hurdles that would prevent a library 
from being created (relatively painlessly) based on the Gingerbread code?

-- 

2. Alert Dialog - Specified child already has a parent - on 2nd attempt

The following code seems to work just fine the first time its used in the 
app but when the user goes to hit the button that calls this Alert Dialog a 
second time it creates a Force Close with this as the gist of the logcat 
(full at the bottom): "The specified child already has a parent. You must 
call removeView() on the child's parent first."

        final AlertDialog.Builder alert = new AlertDialog.Builder(this);
        final EditText input = new EditText(this);
        
        alert.setTitle("Mileage");
        alert.setMessage("Set your mileage");
        
        alert.setView(input);
        alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() 
{

@Override
public void onClick(DialogInterface dialog, int whichButton) {
 String value = input.getText().toString();
SharedPreferences prefs = getSharedPreferences("myDataStorage", 
MODE_PRIVATE);
        Editor mEditor = prefs.edit();
        mEditor.putString("mileage", value);
            mEditor.commit();
            UpdateMileage();
            dialog.dismiss();
}
});
        
        alert.setNegativeButton("Cancel", new 
DialogInterface.OnClickListener() {  
          
         public void onClick(DialogInterface dialog, int whichButton) {  
         dialog.cancel();
         dialog.dismiss();
         }  
        });
        
        //Update Button
        ImageButton UpdateBtn = (ImageButton) 
findViewById(R.id.myride_update);
        UpdateBtn.setOnClickListener(new View.OnClickListener() {
         public void onClick(View v) { 
         alert.show();
         UpdateMileage();
         return;
         }
        });

///////////// Stack Trace /////////////
02-17 15:28:09.560: ERROR/AndroidRuntime(2503): 
java.lang.IllegalStateException: The specified child already has a parent. 
You must call removeView() on the child's parent first.
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.view.ViewGroup.addViewInner(ViewGroup.java:1976)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.view.ViewGroup.addView(ViewGroup.java:1871)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.view.ViewGroup.addView(ViewGroup.java:1851)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
com.android.internal.app.AlertController.setupView(AlertController.java:365)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
com.android.internal.app.AlertController.installContent(AlertController.java:206)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.app.AlertDialog.onCreate(AlertDialog.java:251)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.app.Dialog.dispatchOnCreate(Dialog.java:307)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.app.Dialog.show(Dialog.java:225)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.app.AlertDialog$Builder.show(AlertDialog.java:812)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
com.ceistudios.android.application.Dashboard$14.onClick(Dashboard.java:298)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.view.View.performClick(View.java:2501)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.view.View$PerformClick.run(View.java:9107)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.os.Handler.handleCallback(Handler.java:587)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.os.Handler.dispatchMessage(Handler.java:92)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.os.Looper.loop(Looper.java:123)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
android.app.ActivityThread.main(ActivityThread.java:3812)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
java.lang.reflect.Method.invokeNative(Native Method)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
java.lang.reflect.Method.invoke(Method.java:507)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
02-17 15:28:09.560: ERROR/AndroidRuntime(2503):     at 
dalvik.system.NativeStart.main(Native Method)

-- 

3. beagleboard porting

4. Building and flashing HTC HERO G2

5. Porting to MIPS

6. Android On Nokia N95

7. Loading Froyo onto ADP2