2011-05-20 2 views
0

Je souhaite implémenter google maps dans mon application. J'ai fait la procédure pour implémenter google maps dans une application telle que l'obtention de la clé API et l'exécution dans l'émulateur Google ApI, etc. Son fonctionnement est correct dans Google ApI Emulator. Maintenant, je veux mettre en œuvre ce google maps dans mon application qui est dans Android2.1. Je ne peux pas faire. Si je cours cette appli google maps dans android mobile qui est dans android2.1 son erreur d'affichage Maintenant, je veux savoir s'il est possible d'exécuter google maps dans Android2.1? si c'est le cas, comment? S'il vous plaît aidez-moi .. Il est très urgent ..Google Maps ne fonctionne pas dans le mobile

Ici je signale l'erreur qui affiche dans logcat lors de l'exécution de mes cartes Google Android2.1

05-20 11:35:45.488: ERROR/AndroidRuntime(3644): Uncaught handler: thread main exiting due to uncaught exception 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.google.apis/com.example.android.apis.view.MapViewDemo}: android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread.access$2200(ActivityThread.java:119) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.os.Handler.dispatchMessage(Handler.java:99) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.os.Looper.loop(Looper.java:123) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread.main(ActivityThread.java:4363) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at java.lang.reflect.Method.invokeNative(Native Method) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at java.lang.reflect.Method.invoke(Method.java:521) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at dalvik.system.NativeStart.main(Native Method) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.createView(LayoutInflater.java:513) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:618) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.inflate(LayoutInflater.java:407) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.inflate(LayoutInflater.java:320) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.inflate(LayoutInflater.java:276) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.Activity.setContentView(Activity.java:1622) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.example.android.apis.view.MapViewDemo.onCreate(MapViewDemo.java:50) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  ... 11 more 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by: java.lang.reflect.InvocationTargetException 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.google.android.maps.MapView.<init>(MapView.java:238) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at java.lang.reflect.Constructor.constructNative(Native Method) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at java.lang.reflect.Constructor.newInstance(Constructor.java:446) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.view.LayoutInflater.createView(LayoutInflater.java:500) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  ... 21 more 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x1080215 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.content.res.Resources.getValue(Resources.java:891) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at android.content.res.Resources.getDrawable(Resources.java:579) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.google.android.maps.MapView.<init>(MapView.java:286) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  at com.google.android.maps.MapView.<init>(MapView.java:255) 
05-20 11:35:45.498: ERROR/AndroidRuntime(3644):  ... 25 more 
+0

avez-Générez la clé API trop – Lavanya

+0

mobile ne je produis une seule touche son fonctionnement parfaitement dans l'émulateur, mais pas dans Android device.pls dire comment générer une clé API pour mobile ?? – deepa

+0

Je suis confronté au même problème. L'émulateur fonctionne correctement avec la clé de débogage, mais lorsque je démarre le programme sur mon mobile, il affiche uniquement une carte vide. – hitzi

Répondre

1

Avez-vous avez ajouté <uses-library android:name="com.google.android.maps" /> au fichier manifest?

+0

s j'ai donné .. il fonctionne parfaitement wen je choisis l'émulateur comme Google APi .. son pas fonctionnant dans Android 2.1 mis à jour .. – deepa