I am trying to get my simple app which will display user\'s location running on devices from Android 2.3 to Android 4.
Check out this related question: Google Maps on Android blank space
It looks like the change from v1 to v2 makes it hard to get a new API key, and in v2 the keys are stored in the manifest. Let me know if this works.
Add both permission into AndroidManifest.xml file:
<permission
android:name="YOUR_PACKAGE_NAME.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="YOUR_PACKAGE_NAME.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
OK, after hours of hours of thinking and trying, I think I can mark this problem as fixed.
The problem is caused by the Wrong Date & Time in the 2.3 device.
The time and date on 2.3 device is reset to 2013/01/01 due to out of power for a long time(as you can see in the log output, it shows 01/04 as date). And that can also explain why running with the same code, the Google Maps V2 didn't show up on 2.3 device but will show up on 4.0+ device (because the 4.0+ device I'm using has the correct time).
I think because of the huge difference of date and time between this device and the Google Maps server, the communication between them got malfunctioned (don't know exactly why, but it should be some timestamp stuff).
When I manually set the date and time of the 2.3 device to the current time, the problem got solved immediately.
This problem is so weird and the logout just showing like:
Could not find class 'maps.i.k', referenced from method maps.z.ag.a
is so ambiguous that makes me very hard to think about the problem is caused by wrong date & time on the device.
So next time if you encountered something wrong while playing around with Google Maps API, please follow this steps to check:
Google Maps API Android V2
not Google Maps API V2
, log
will return Authentication Failed
if you do something wrong with
this step)Authentication Failed
Thanks for anyone who tried to help me, and I hope this question & solution can help others.
This is the common problem occured in google Map using Api v2
.The main reason in google play service
is if the google play service
is updated then only the mapview will display.The problem can be solved if you run the app in device.So better try in device it will work for you!!
OK. i think below link will help you somewhat as it also saved me too having this same issue. Though i am not sure as you are not getting any problem inside API level 4.0+ version
google-maps-v2-shows-blank-screen-on-android-2-2
Problem may be because of Debug.keystore
Solution : Make Sure you are debuging your App with the same keystore with which you have created your SHA-1 code for getting yout API key.
let say you are using Ubantu and opening your Eclipse as root then whenever you will building your app eclipse will use default.keystore inside to run your app in device located in root/.android/debug.keystore
so when you are creating your API key you have to make Sure you are using the same Keystore with which you will build you app.
Hope it will help you.