My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 4699: Bug: Crash on supported devices when OpenGL is set to android:required="false"
76 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  May 2013


Sign in to add a comment
 
Reported by supp...@twofortyfouram.com, Dec 12, 2012
STEPS TO REPRODUCE
1. Create an application based on the Google Maps sample app.
2. Install the application and verify that maps load correctly.
3. Edit the app's Android Manifest and set required="false" for the OpenGL feature entry.
4. Reinstall the application and launch an Activity that displays a map.


RESULTS
Expected: The application shouldn't crash, because it is running on a supported device.
Actual: The application crashes with the following exception:
E/AndroidRuntime( 8820): FATAL EXCEPTION: main
E/AndroidRuntime( 8820): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mapdemo/com.example.mapdemo.RawMapViewDemoActivity}: java.lang.RuntimeException: Google Maps Android API only supports OpenGL ES 2.0 andabove. Please add <uses-feature android:glEsVersion="0x00020000" android:required="true" /> into AndroidManifest.xml
E/AndroidRuntime( 8820): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2205)
E/AndroidRuntime( 8820): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2240)
E/AndroidRuntime( 8820): 	at android.app.ActivityThread.access$600(ActivityThread.java:139)
E/AndroidRuntime( 8820): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1262)
E/AndroidRuntime( 8820): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 8820): 	at android.os.Looper.loop(Looper.java:156)
E/AndroidRuntime( 8820): 	at android.app.ActivityThread.main(ActivityThread.java:5008)
E/AndroidRuntime( 8820): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 8820): 	at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 8820): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 8820): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 8820): 	at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 8820): Caused by: java.lang.RuntimeException: Google Maps Android API only supports OpenGL ES 2.0 andabove. Please add <uses-feature android:glEsVersion="0x00020000" android:required="true" /> into AndroidManifest.xml
E/AndroidRuntime( 8820): 	at maps.y.ae.a(Unknown Source)
E/AndroidRuntime( 8820): 	at maps.y.bm.onCreate(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.internal.IMapViewDelegate$Stub.onTransact(IMapViewDelegate.java:66)
E/AndroidRuntime( 8820): 	at android.os.Binder.transact(Binder.java:297)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.internal.IMapViewDelegate$a$a.onCreate(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.MapView$b.onCreate(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.internal.c$3.a(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.internal.i.b(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.MapView$a.a(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.MapView$a.a(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.internal.c.a(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.internal.c.onCreate(Unknown Source)
E/AndroidRuntime( 8820): 	at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
E/AndroidRuntime( 8820): 	at com.example.mapdemo.RawMapViewDemoActivity.onCreate(RawMapViewDemoActivity.java:40)
E/AndroidRuntime( 8820): 	at android.app.Activity.performCreate(Activity.java:4543)
E/AndroidRuntime( 8820): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
E/AndroidRuntime( 8820): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2161)
E/AndroidRuntime( 8820): 	... 11 more


NOTES
I realize that Google Maps requires OpenGL, however some applications may not consider maps to be critical functionality and may have alternative UIs when maps aren't available.  These applications should be able to define a single APK with required="false" for OpenGL, and decide at runtime whether to try to launch a Maps-based UI or not.
Dec 17, 2012
#1 lutz.ben...@gmail.com
I want to be able to serve v1 maps to devices without OpenGL, and v2 to devices with OpenGL. In order to keep a single APK I have to set the required flag to false.
Dec 22, 2012
#2 name.is....@gmail.com
For future reference, the problem is tracked on stackoverflow : http://stackoverflow.com/questions/13714484/android-maps-api-requires-opengl-es-2
Dec 27, 2012
Project Member #3 a...@google.com
(No comment was entered for this change.)
Status: Confirmed
Labels: Internal-7894182
Jan 31, 2013
Project Member #4 cbro@google.com
This issue will be fixed in the next release of the Maps Android API.
Status: FixedNotReleased
Labels: Fixed-Jan25
Feb 8, 2013
#5 st...@glympse.com
Any idea when the next release will be?

My goal is to use V2 maps on the devices that support it and some alternative on devices that don't (Kindle, BB10, OpenGL 1.x devices, etc.).

Is the fix in the Google Services runtime or the google-play-services_lib stub library?  I'm guessing it is in the runtime, which means we'll likely still crash on devices that haven't updated, even if we link against a newer library.

Seems like we'll need a way to ask "will the V2 Map control crash if I try to start it without required=true in my manifest?"  The answer to that question along with a OpenGL 2.0+ check will be needed to dynamically use the V2 Map control. I'm not sure what the code looks like to ask that question. Maybe it is just a version check against the Google Services runtime. Maybe that check could live in the stub library.
Feb 10, 2013
Project Member #6 cbro@google.com
I can't say with any certainty when the next release will be - I'd hate to disappoint if I were wrong :-)

The fix will be in the runtime, so you're right: devices will need to have been updated to the latest version.

Have you tried inflating a fragment after doing the check yourself? 
Feb 26, 2013
#7 supp...@twofortyfouram.com
Unfortunately, this issue is not fully fixed with the new version of the Google Play Services library released today.  Previously, the maps library would crash if required="false" was set.  With the update today, this crash no longer occurs.  However the map view will not actually display if the Android Manifest declares required="false" for OpenGL (even on devices that support OpenGLES 2.0).

I realize that Google Maps requires OpenGL, however some applications may not consider maps to be critical functionality and may have alternative UIs when maps aren't available.  These applications should be able to define a single APK with required="false" for OpenGL, and decide at runtime whether to try to launch a Maps-based UI or not.
Feb 26, 2013
#8 a...@racechrono.com
Please re-open this issue, as it is not fixed. The MapFragment should still show up even without OpenGLES2 requirement in AndroidManifest.xml. The AndroidManifest.xml is the place where app developers put hardware requirements of the app it self. Libraries and components should check their hardware requirements runtime, leaving the freedom of dynamic loading to the app developers.
Feb 26, 2013
#11 gert.van...@gmail.com
This issue is not fixed, it does not throw an exception anymore, but the behavior is certainly not as expected.

Current behavior: The MapFragment is left blanco when required="false". Even on devices that support OpenGLES2. A message is logged to the Error log, claiming the device does not support OpenGLES2.
Expected: Show a map if the device is capable
Feb 26, 2013
Project Member #12 cbro@google.com
(No comment was entered for this change.)
Status: Confirmed
Mar 13, 2013
#13 ricardoj...@gmail.com
I can also confirm that the issue is still there. When you set the "required" attribute to false, the map is not displayed, even if the device actually supports openGL ES 2.

This is actually a big problem for those applications which want to provide multiple interfaces according to the device's hardware.
Mar 14, 2013
#14 kwanste
I am seeing the same thing that everyone else is reporting where even though it's not crashing, on devices where there is OpenGL ES 2 support, we get nothing by a blank screen. 
Mar 28, 2013
#15 stephen.toner
is there any plan to fix this soon?
Apr 12, 2013
#16 joh...@gmail.com
Same thing it's not crashing, however android:glEsVersion="0x00020000" android:required="false" gives a blank screen on devices that support OpenGL ES 2
Apr 16, 2013
Project Member #17 cbro@google.com
This will be properly fixed (second time lucky!) in the next release.

(... and no, I'm sorry I can't tell you when the next release is coming out)
Status: FixedNotReleased
May 21, 2013
Project Member #18 cbro@google.com
(No comment was entered for this change.)
Status: Fixed
Labels: Fixed-May2013
May 21, 2013
#19 st...@glympse.com
Thank you!

I confirmed the fix. In fact, I confirmed that the entire "<uses-feature android:glEsVersion.../>" line is no longer required for the V2 map control to work. People should probably still put the following in their AndroidManifest.xml, but it is not required...

<uses-feature android:glEsVersion="0x00020000" android:required="false" />

...for me, I'm writing a library, so I don't have control over what the main application sticks in their manifest.

In my case, I only want to use the Google V2 map control when it is installed and ready to go (don't want the user to have install or update). This is what I'm doing at the moment...

1) Make sure GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) returns ConnectionResult.SUCCESS

2) Make sure ((ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE)).getDeviceConfigurationInfo().reqGlEsVersion >= 0x00020000

3) Make sure context.getPackageManager().getPackageInfo("com.android.vending", 0).versionCode > 1

4) Make sure context.getPackageManager().getPackageInfo("com.google.android.gms", 0).versionCode >= 3136136

5) Make sure context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA).metaData.getString("com.google.android.maps.v2.API_KEY") is not empty

Feel free to use this or correct me if I got something wrong.

P.S. It was great meeting the Android devs at Google I/O!
May 24, 2013
#20 jo...@iamyellow.net
Hey!

Somehow related with this solved issue...
Could anybody tell me why my old HTC Magic was displaying correctly the maps before the May update? Now I'm getting "Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above" in logcat, but not before the update. 

The device doesn't support OpenGL 2.0... but neither now nor before!
Also, does the official Maps app use the same SDK?  since it's not requiring opengl 2
May 27, 2013
#21 isi8...@gmail.com
hello, sorry but my English is not very good.

I've been like a week burning my head because my phone supports OpenG gl 2.0, but using google map api v2 android, the map would not load, it was all white, only saw the zoom buttons. I found the solution for my case here, http://forum.xda-developers.com/showthread.php?t=924777

I said if you can be of assistance to you or anyone.
Jun 7, 2013
#22 alejandr...@gmail.com
Hello, i have a problem

My app was displaying maps in a HTC Magic without any problem, but after this update it only shows a blank screen.

Why??
Jun 10, 2013
#23 ramones....@gmail.com
I have the same problem with #22.
Maps was working well a couple days ago. After the update it only shows white screen.
In HTC Wildfire device
Jun 10, 2013
Project Member #24 cbro@google.com
To the few comments above:

That is unrelated to this bug - could you please file a new bug report?
Jun 13, 2013
#25 vuminhta...@gmail.com
Hello every body!
i have same problem with #21
i can see the map when run my app Android
i was try many case, however i still problem.I can't fix it

i was to try add <uses-feature android:glEsVersion="0x00020000" android:required="true" />
but...i can't
Jun 17, 2013
#27 csh...@gmail.com
I have the same problem with the emulator
Jul 16, 2013
#28 caota...@gmail.com
whether I set the manifest "   <uses-feature android:glEsVersion="0x00020000" android:required="true"/>  " or "required = "false""  or delete this line ,its always show me the error : E/Google Maps Android API(1315): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
Dec 30, 2013
#29 hiteshch...@gmail.com
I am also facing the same problem !! do any one get the answer of this problem ???
Jan 6, 2014
#30 parth92...@gmail.com
Black screen on emulator with zoom control i use 4.4 google api emulator. is that any method for show map on emulator? is that required to register our project on google api console ?
Sign in to add a comment

Powered by Google Project Hosting