MapKit icon indicating copy to clipboard operation
MapKit copied to clipboard

app crashes

Open ghost opened this issue 11 years ago • 13 comments

I get this when I try to showMap:

E/AndroidRuntime( 568): java.lang.NullPointerException: CameraUpdateFactory is not initialized

ghost avatar Sep 13 '14 21:09 ghost

do you have any other plugins installed? mapkit shouldn't be using any Camera related stuff

lholmquist avatar Sep 14 '14 00:09 lholmquist

I do have the cordova camera installed, but it works fine

Den 14. sep. 2014 kl. 02.53 skrev Lucas Holmquist [email protected]:

do you have any other plugins installed? mapkit shouldn't be using any Camera related stuff

— Reply to this email directly or view it on GitHub.

ghost avatar Sep 14 '14 09:09 ghost

CameraUpdateFactory IS a google maps v2 feature to set zoom and according stackoverflow

ghost avatar Sep 14 '14 11:09 ghost

wtf, MapsInitializer.initialize(cordova.getActivity()); was commented in MapKit.java

ghost avatar Sep 14 '14 11:09 ghost

this line?

https://github.com/imhotep/MapKit/blob/master/src/android/MapKit.java#L70

lholmquist avatar Sep 14 '14 13:09 lholmquist

is this issue solved? app is crashing for me with android... not sure if it's related (works fine on iOS)

fidoboy avatar Nov 26 '14 02:11 fidoboy

I solved it. Let me Get Back to you later when I'm on a computer

Sendt fra min iPhone

Den 26. nov. 2014 kl. 03.50 skrev fidoboy [email protected]:

is this issue solved? app is crashing for me with android... not sure if it's related

— Reply to this email directly or view it on GitHub.

ghost avatar Nov 26 '14 07:11 ghost

cool! :+1:

fidoboy avatar Nov 26 '14 17:11 fidoboy

*Problem Solved See Below

I am also getting an app crash in android. I'm not getting a specific error message just a message "Unfortunately, TestApp has stopped".

iPhone functions fine.

Any ideas?

Solution was to switch to the "Google API's" system image. I was using the wrong Android emulation settings. I needed to install and use the "Google API's" system image from the Android SDK and switch to it.

All is working now.

jpmetcalf avatar Dec 08 '14 21:12 jpmetcalf

Hey jpmetcalf can you explain a bit more in detail? Where did you changed the Google APIs? What version?

fidoboy avatar Dec 08 '14 22:12 fidoboy

I am currently using Android 4.4.2 (API 19).

The solution for me was to launch the "SDK Manager.exe" from my android-sdk install and then add the "Google APIs (x86 System Image)".

Then I reconfigured my Android virtual image via the "AVD Manager.exe" from my android-sdk install.

I am currently using the following settings in my Virtual Device: avd

jpmetcalf avatar Dec 10 '14 16:12 jpmetcalf

Thanks for the info @jpmetcalf! I'm also using API 19, with newer versions the plugin fails to compile. But i'm testing on real device (not simulator) and even with v19 it crashes... :(

fidoboy avatar Dec 10 '14 20:12 fidoboy

Finally i managed to solve this using the right Android API KEY :) :facepunch:

fidoboy avatar Dec 16 '14 18:12 fidoboy