Profete162 Posted March 18, 2010 Share Posted March 18, 2010 (edited) Salut le monde! Je suis pour le moment en train de m'arracher les cheveux pour appeler mon activité Google maps. Je l'appelle facilement en la mettant en Activity: public class BelgianMap extends Activity (blabla) Elle est donc bien déclarée dans le manifest et toussa toussa Ensuite, je vais donc en faire une mapActivity: public class BelgianMap extends MapActivity implements LocationListener { (blablabla) je lui rajoute aussi ce dont il a besoin: @Override protected boolean isRouteDisplayed() { @Override public void onLocationChanged(Location location) { @Override public void onProviderDisabled(String arg0) { @Override public void onProviderEnabled(String provider) { @Override public void onStatusChanged(String provider, int status, Bundle extras) { ce qui fonctionne parfaitement en Google API 1.5, soit dit en passant et j'obtiens le message d'erreur suivant: 03-18 11:21:06.933: ERROR/AndroidRuntime(18748): java.lang.NoClassDefFoundError: com.profete162.BETrainsSNCB.BelgianMap03-18 11:21:06.933: ERROR/AndroidRuntime(18748): at com.profete162.BETrainsSNCB.InfoGare$2.onClick(InfoGare.java:109) Je ne comprends vraiment pas ce qui se passe et l'aide Google n'est pas tres claire (http://developer.android.com/reference/java/lang/NoClassDefFoundError.html) Merci pour tout indice. Edited March 18, 2010 by Profete162 Quote Link to comment Share on other sites More sharing options...
neoakira Posted March 18, 2010 Share Posted March 18, 2010 il y a quoi a cette ligne là InfoGare.java:109 ? et tu fais pas ca sur archos j'espère... Quote Link to comment Share on other sites More sharing options...
Profete162 Posted March 18, 2010 Author Share Posted March 18, 2010 il y a quoi a cette ligne là InfoGare.java:109 ?et tu fais pas ca sur archos j'espère... Il y a simplement ceci: Intent i = new Intent(InfoGare.this, BelgianMap.class); startActivityForResult(i, 0); Qui fonctionne très bien quand je mets BelgianMap en Activity. Le probleme apparait des que je passe BelgianMap en MapActivity Quote Link to comment Share on other sites More sharing options...
Nivek Posted March 18, 2010 Share Posted March 18, 2010 (edited) Etrange... Et Eclipse ne remonte aucune erreur quand tu passes en MapActivity ? Tu as bien mis dans ton manifest (cf http://developer.android.com/resources/tutorials/views/hello-mapview.html) : ? Edited March 18, 2010 by Nivek Quote Link to comment Share on other sites More sharing options...
Profete162 Posted March 18, 2010 Author Share Posted March 18, 2010 (edited) Oui, j'ai bien rajouté cette ligne... (corrige ton lien, il y a une parenthese en trop dedans) EDIT: merci Kev', c'est moi qui avais mal placé la ligne! Mea Culpa et encore merci. Edited March 18, 2010 by Profete162 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.