[email protected] wrote: > Ok but i have problem with the startActivity method. > > I created a class ScreenGet witch extends Actity and override > onCreated. > > I write a function main to launch it : > > ------------------ Begin Code ---------------- > > public class Main > { > public static void main(String[] args) > { > Intent i = new Intent(); > i.putExtra("title", "titre"); > i.putExtra("label", "label"); > i.putExtra("size", 12); > ScreenGet sg = new ScreenGet(); > sg.startActivity(i); > } > } > -------------- End Code ---------------------
This is not Android code. public static void main() is not an entry point into an Android application. > I supposed when I run it, it launch my activity , but i have got the > following error : > > --------------------------------------------------------------------------- > # > # An unexpected error has been detected by Java Runtime Environment: > # > # Internal Error (classFileParser.cpp:2923), pid=4668, tid=5032 > # Error: ShouldNotReachHere() > # > # Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode windows- > x86) > # An error report file with more information is saved as: > # C:\Users\MXP\workspace\JythonroidFunctions\hs_err_pid4668.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp > # > -------------------------------------------------------------------------- This is not Android. This is desktop Java. There is no C:\ drive and no Sun Java VM inside an Android device or emulator. Have you worked through the online tutorials? http://developer.android.com/guide/tutorials/hello-world.html http://developer.android.com/guide/tutorials/notepad/index.html -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, $35/Year --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

