dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 164 forks source link

blank with android 4.2.2 #7

Open gerardocastro opened 8 years ago

gerardocastro commented 8 years ago

i'm trying to use the map with android 4.2.2 and only shows the 'google' sign

RusEu commented 8 years ago

check if your google api key is correct

dapriett commented 8 years ago

Sorry for the late response. Yes, blank screen typically means missing or invalid api key. You'll probably see an error buried in your Android logs.

FINACSA commented 8 years ago

i've changed the key, same result, only with android 4.2, same with the demo

naderio commented 8 years ago

i confirm 4.2.2 bug on multiple apps working ok with other android version: google logo, controls ok, marker(s) ok, but no tiles loading ...

dapriett commented 8 years ago

I don't have a 4.2.2 device laying around, but I tried it in an emulator and I'm getting the same issue. I monitored the logs coming from the device and was seeing this:

01-21 00:08:33.653: I/ActivityManager(383): Displayed com.android.systemui/.recent.RecentsActivity: +97ms
01-21 00:08:43.261: I/dalvikvm(2925): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
01-21 00:08:43.261: I/dalvikvm(2925): DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras
01-21 00:08:43.261: I/dalvikvm(2925): Could not find method android.os.UserManager.getApplicationRestrictions, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzap
01-21 00:08:43.261: E/dalvikvm(2925): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzb
01-21 00:08:43.261: W/dalvikvm(2925): VFY: unable to resolve check-cast 24 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/GooglePlayServicesUtil;
01-21 00:08:43.261: I/dalvikvm(2925): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh

This one was an error Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzb. Not sure if that is causing an issue - not seeing those on other Android versions.

jaimeglez commented 8 years ago

I'm having the same issue with the 4.2.2 version, map is not loading ( I loaded the key already, tried demo and didn't work either).

dapriett commented 8 years ago

This on an emulator or real device? I've only tried on an emulator (Genymotion) - don't have a 4.2.2 device. I wonder if real devices have the same issue. Try looking at the logs from android - Device monitor or logcat.

jaimeglez commented 8 years ago

The issue also happens on real device, this is what i got from logcat

02-02 10:13:32.381: E/dalvikvm(3390): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.zze.zzb
02-02 10:13:32.393: E/dalvikvm(3390): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.nb.a
02-02 10:13:32.429: E/dalvikvm(3390): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.mw.a
02-02 10:13:33.433: E/ctxmgr(688): [PowerConnectionProducer]Could not write powerInfo=Plug state: 1 BatteryLevel: 0.47, status=Status{statusCode=unknown status code: 7503, resolution=null}

Actually I think is the same error that you got

sharnupatil3535 commented 8 years ago

i get the same error with tns livesync

gerardocastro commented 8 years ago

any news on a fix for this error?

BernardoQR commented 8 years ago

Hi, I installed this module in my app and I followed step by step. I'm working in a Telerik platform app - nativescript and when I write this on my js. "var mapsModule = require("nativescript-google-maps-sdk");" I get this error. Failed to find module nativescript-google-maps-sdk. any idea why? I will really appreciate any help. I'm using VS 2013 with APPBUILDER plugin and I'm testing my code on my Iphone.

dapriett commented 8 years ago

@BernardoQR I'm not familiar with appbuilder - make sure the plugin node_module is installed. You can also try var mapsModule = require("nativescript-google-maps-sdk/map-view");

I did see a note here http://docs.telerik.com/platform/appbuilder/nativescript/working-with-custom-modules/manage-custom-modules-package-json that says

IMPORTANT: The NativeScript framework searches for the file pointed by the main value in the plugins's package.json file. You need to require the plugin by referencing its name and the main value.

BernardoQR commented 8 years ago

Thank you @dapriett . I will take a look.

jaysson commented 8 years ago

Same issue on Android 5.1.1 (OnePlus 2).

dapriett commented 8 years ago

What did you Android logs say @jaysson? I'm guessing it's a different issue.

jaysson commented 8 years ago

I deleted platforms/android and rebuilt, it is working now.

valentinstoychev commented 8 years ago

Hey @dapriett do you have an idea when this (https://github.com/dapriett/nativescript-google-maps-sdk/issues/7#issuecomment-173455656) can be resolved or if not do you accept PRs on this? :)

dapriett commented 8 years ago

hi @valentinstoychev - I have previously spent some time trying to resolve it, but have had no luck pinpointing the exact issue. Haven't had time recently, and don't know enough about the internals of android. I would gladly accept some PRs!

I noticed this issue was closed today related to multidex support: https://github.com/NativeScript/android-runtime/issues/344

Not sure if that's related or not - but it may be worth trying out.

chilas commented 8 years ago

@dapriett Please any way to resolve the blank screen issue. I have a tight deadline and I'm so hoping that the blank screen disappears. I have gone through the tutorial like a quadrillion times and I've practically tried everything here including deleting the platform/android directory. I'm also new to NativeScript BTW. Thanks.

chilas commented 8 years ago

I was able to solve the problem. First I think using AppBuilder is not such a good idea. I recreated my project using vs code and also installed Google Repository using SDK Manager because gradle was throwing a No version is installed errror while looking for com.google.android.gms:play-services-maps referenced in the include.gradle file and finally tns remove platform android and tns add platform android. I hope this helps someone out there.

rpereiraprieto commented 8 years ago

API 19 (4.4.4) works correctly but API 17 (4.2.2) does not work . the multidex support , does not fix the problem. help please ...