0

I am getting this error while trying to display a map with info in my app:

04-09 18:44:06.383: ERROR/libEGL(32567): call to OpenGL ES API with no current context (logged once per thread)
04-09 18:44:06.393: ERROR/mm-libcamera2(176): PROFILE HAL: stopPreview(): E: 1397061846.399104417
04-09 18:44:06.393: ERROR/mm-camera(253): config_MSG_ID_STOP_ACK: streamon_mask is not clear. Should not call PP_Release_HW
04-09 18:44:06.393: ERROR/mm-libcamera2(176): PROFILE HAL: stopPreview(): E: 1397061846.403987676
04-09 18:44:06.403: ERROR/QCameraHWI(176): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*):Received Setting NULL preview window
04-09 18:44:06.403: ERROR/QCameraHWI(176): android::status_t android::QCameraHardwareInterface::setPreviewWindow(preview_stream_ops_t*): mPreviewWindow = 0x0x0, mStreamDisplay = 0x0xb8776a00
04-09 18:44:06.403: ERROR/mm-camera(253): config_shutdown_pp Camera not in streaming mode. Returning.
04-09 18:44:06.403: ERROR/mm-camera(253): vfe_ops_deinit: E
04-09 18:44:06.463: ERROR/libEGL(32567): call to OpenGL ES API with no current context (logged once per thread)
04-09 18:44:06.553: ERROR/AndroidRuntime(32567): FATAL EXCEPTION: main
    Process: my.project, PID: 32567
    java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable
    at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
    at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
    at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:284)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
    at android.app.Activity.setContentView(Activity.java:1929)
    at my.project.activities.PoiMapResults.onCreate(PoiMapResults.java:63)
    at android.app.Activity.performCreate(Activity.java:5231)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    at android.app.ActivityThread.access$800(ActivityThread.java:135)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5017)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    at dalvik.system.NativeStart.main(Native Method)
04-09 18:44:06.683: ERROR/qcom_sensors_hal(596): hal_process_report_ind: Bad item quality: 11

It just fails when call that activity. I think I have google play services imported fine but I am not sure now...

Biribu
  • 3,615
  • 13
  • 43
  • 79
  • it does not look like yoi inported google play services as a library project and just imported the jar file, you need the entire project – tyczj Apr 09 '14 at 16:49
  • Should I delete all related to google services import and start again? – Biribu Apr 09 '14 at 16:50
  • Starting over: Project structure>Modules>Import module> Select google-play-services_lib in libproject folder inside google_play_Services And how to import? create module from existing sources or import module frome xternal model? – Biribu Apr 09 '14 at 16:53
  • http://developer.android.com/google/play-services/setup.html – tyczj Apr 09 '14 at 16:57
  • I am using intellij idea and I don't have gradles as says in the tutorial. What should I do in this case? I tried to import th whole project and I still have the fail – Biribu Apr 09 '14 at 17:09

2 Answers2

2

What i have done to add google-play-services is that import a new project into eclipse workspace, and that path of that was be

android-sdk-macosx/extras/google/google_play_services/libproject/google-play-services_lib

and add as library in your project.. that it .. simple!! you might require to add support library in your project.

Lal
  • 14,726
  • 4
  • 45
  • 70
  • I tried to do that. Importing a new project to my intellij idea, and add it as library. No errors, but running it, it fails – Biribu Apr 09 '14 at 17:15
  • I have added permission about protectionLevel signature in Maps_receive and uses-permission about maps_receive. Also I have my api key in meta-data – Biribu Apr 09 '14 at 17:21
  • 1
    See this [link](http://stackoverflow.com/questions/15771485/android-google-maps-api-v2-noclassdeffounderror) and this [link](http://stackoverflow.com/questions/14372391/java-lang-noclassdeffounderror-com-google-android-gms-rstyleable) too..Try it out.. – Lal Apr 09 '14 at 17:23
  • YOU ARE THE MAN. The first link was perfect. With screenshots. It worked at first time. Thank you man. Tomorrow is the review of the app and I had to setup the project right now. I was thinking I would need all night to fix it. Thank you again. – Biribu Apr 09 '14 at 17:32
  • Thats ok maan..Happy that you got it before the review..:) – Lal Apr 09 '14 at 17:34
  • AAaaggg, it doesn't fail but map is not shown. Just grey screen with map keys (lock, zoom...) – Biribu Apr 09 '14 at 17:44
  • Maybe the key is out of date? – Biribu Apr 09 '14 at 17:48
  • 1
    If the google logo is displayed then it is some authentication problem with the google..Are you sure that the key you used is right and specified the package name in the google api console..? @Biribu – Lal Apr 09 '14 at 17:48
  • 1
    Try running the code after obtaining a new key @Biribu – Lal Apr 09 '14 at 17:49
  • The app is working with this key. In store. But if I sign it up again, doesn't show the map. I will try to generate a new one – Biribu Apr 09 '14 at 17:49
  • I am stucked to Create new Android Key in API access. I don't know where to execute this command: keytool -list -v -keystore mystore.keystore – Biribu Apr 09 '14 at 17:58
  • 1
    You just follow the second answer in this [link](http://stackoverflow.com/questions/12214467/how-to-obtain-signing-certificate-fingerprint-sha1-for-oauth-2-0-on-android) to obtain the SHA1 fingerprint..@Biribu – Lal Apr 09 '14 at 17:59
  • It is done. Now it show the map. Thank you again. I added all your link to favourites to check whenever I have this kind of problems. – Biribu Apr 09 '14 at 18:10
  • Thank you...Upvote my answer please if it helped you or flag as important.. @Biribu – Lal Apr 09 '14 at 18:11
  • 1
    Please upvote if it helped you..I'm in need of reputations..@Biribu – Lal Apr 09 '14 at 18:14
0

The error java.lang.noclassdeffounderror appears when your installer doesn't find some dependencies in your project.

E.g. In eclipse you need to enable check on "Android private libraries" and "Android Dependencies" in Build Path if you want to package extras libs into APK

I don't use IntelliJ but in this link talk about it java.lang.noclassdeffounderror: com.google.android.gms.R$styleable

Community
  • 1
  • 1
Cesardl
  • 1,831
  • 1
  • 14
  • 18