Android Maps V2 App Constantly Crashes
Solution 1:
EDIT --- I recommend you try the Genymotion instead of the eclipse android emulator.
But you can try the steps below.
You can do this steps if you alred have your API KEY
Step 1:
configuration AndroindManifest.xml:
<?xml version="1.0" encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.br.activitys"android:versionCode="1"android:versionName="1.0" ><uses-sdkandroid:minSdkVersion="16"android:targetSdkVersion="16" /><permissionandroid:name="com.br.activitys.permission.MAPS_RECEIVE"android:protectionLevel="signature" /><uses-permissionandroid:name="com.br.activitys.permission.MAPS_RECEIVE" /><uses-permissionandroid:name="android.permission.INTERNET" /><uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE" /><uses-permissionandroid:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /><uses-permissionandroid:name="android.permission.ACCESS_COARSE_LOCATION" /><uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION" /><uses-featureandroid:glEsVersion="0x00020000"android:required="true" /><applicationandroid:allowBackup="true"android:icon="@drawable/icon"android:label="@string/app_name"android:theme="@android:style/Theme.Holo.Light.DarkActionBar"android:debuggable="true"><meta-dataandroid:name="com.google.android.maps.v2.API_KEY"android:value="YOUR API KEY" /><activity> ... </activity></application></manifest>
Step 2: Create an emulator 4.2.2 API 17
After that, start and wait this completely loaded. Step 3: Download the files https://www.dropbox.com/s/m8p5jsvg9i4l5j3/com.android.vending-20130716.apk e https://www.dropbox.com/s/a90mjl9nhk4qv45/com.google.android.gms-20130716.apk Install it with ADB On windows exceute type CMD
The prompt will opne and you need to access your android instalation folder, in my case C:\Program Files (x86)\Android\android-sdk\platform-tools
So, you will type ADB INSTALL and the path of the files you downloaded.
and
This process take some time(2 or 3 minutes), dont worry.
After that,you need restart the emulator.
step 4: Download https://www.dropbox.com/s/42bz5imaq4uty4j/google_play_services_9.7z extract the folder google_play_services insde of folder extra/google non your SDK directory (in my case C:\Program Files (x86)\Android\android-sdk\extras\google), if the folder alredy exist, delete and replace with this new one. Now, copy the same folder google-play-services_lib which is in google_play_services\libproject to your workspace, and import like an eclipse project. File -> Import
Select Android -> Existing Android Code Into Workspace
Select the folder you copied
and Finish.
Step 5: Now add the library to your project. Right Click in your project and go to properties. In android, scroll down until library and click add.
Choose the project you imported, and click ok
Just for sure, go Project -> Clean and select Clean All Projects
It's done, now just run your app.
Solution 2:
Are you testing your application on Emulator or device..Because the google MapV2 requires a Android device with Google play apk installed in it.
Post a Comment for "Android Maps V2 App Constantly Crashes"