2

I programmatically created mapview in an android fragment: Programmatically Creating MapView and Adding a Marker Results in a null pointer exception in the fragment

However, I am getting the following error while trying to load:

01-20 15:50:02.337 3542-3692/? E/DynamiteModule: Failed to load DynamiteLoader: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.dynamite.DynamiteModule$DynamiteLoaderClassLoader" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.example.mypackage-1/base.apk"],nativeLibraryDirectories=[/data/app/com.example.mypackage-1/lib/arm, /system/fake-libs, /data/app/com.example.mypackage-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]

Here is the mapView:

enter image description here

Note: It's stuck forever like that. Not sure what's the problem. Also, I am using Eclipse for building my project (It's not updated to use Android Studio).

How do I fix this?

Community
  • 1
  • 1
ssk
  • 9,045
  • 26
  • 96
  • 169

2 Answers2

5

It started working after following this:

Android Map loading very slow/not loading at all in started activity until clicking on it

   @Override
    public void onResume() {
        mapView.onResume();
        super.onResume();
    }

    @Override
    public void onPause() {
        super.onPause();
        mapView.onPause();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        mapView.onDestroy();
    }

    @Override
    public void onLowMemory() {
        super.onLowMemory();
        mapView.onLowMemory();
    }
Community
  • 1
  • 1
ssk
  • 9,045
  • 26
  • 96
  • 169
0

Make sure to add the below 3 lines to MapView tag in xml

    xmlns:map="http://schemas.android.com/apk/res-auto"
    map:mapType="normal"
    map:liteMode="true"
Anurag Bhalekar
  • 830
  • 7
  • 9