Error in api 19 but works in api 21 after added maps
<p>before my app work fine in API 19, but after I've added map function in my application it always crash after call main activity, but when i run it in api 21 it works. below i post my error log and main activity</p>

<p>this is my main activity :</p>

<pre><code> public class MainActivity extends AppCompatActivity
            implements NavigationView.OnNavigationItemSelectedListener,
            EventFragment.OnFragmentInteractionListener,
            ProfileFrag.OnFragmentInteractionListener,

        MainTabFragment.OnFragmentInteractionListener {
    private TextView txtName;
    private TextView txtEmail;
    private Button btnLogout;
    private ProgressDialog pDialog;
    private SQLiteHandler db;
    private SessionManager session;
    ImageLoader imageLoader = AppController.getInstance().getImageLoader();

    private static final String TAG = RegisterActivity.class.getSimpleName();

    private String gambar = "http://192.168.0.13/task_manager/image/not.jpeg";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);

        //fungsi baru buat manggil yg di header
        View header = navigationView.getHeaderView(0);
        View headerLayout =navigationView.inflateHeaderView(R.layout.nav_header_main);

        TextView txtName = (TextView) header.findViewById(R.id.nameVisitor);
        final CircularImageView circularimageView = (CircularImageView) headerLayout.findViewById(R.id.netimage);
 db = new SQLiteHandler(getApplicationContext());

        // session manager
        session = new SessionManager(getApplicationContext());

        if (!session.isLoggedIn()) {
            logoutUser();
        }

        // Fetching user details from sqlite
        HashMap&lt;String, String&gt; user = db.getUserDetails();

        final String name = user.get("name");
        final String apikey = user.get("uid");
        //String email = user.get("email");
 txtName.setText(name);
String tag_string_req = "req_login";
        StringRequest strReq = new StringRequest(Request.Method.POST,
                AppConfig.DATA_PROFIL, new Response.Listener&lt;String&gt;() {

            @Override
            public void onResponse(String response) {
                try {
                    JSONObject jObj = new JSONObject(response);
                    boolean error = jObj.getBoolean("error");

                    // Check for error node in json
                    if (!error) {

                        // Now store the user
                        String profil = jObj.getString("gambar");
                        imageLoader.get(profil, new ImageLoader.ImageListener() {

                            @Override
                            public void onErrorResponse(VolleyError error) {
                                Log.e(TAG, "Image Load Error: " + error.getMessage());
                            }

                            @Override
                            public void onResponse(ImageLoader.ImageContainer response, boolean arg1) {
                                if (response.getBitmap() != null) {
                                    // load image into imageview
                                    circularimageView.setImageBitmap(response.getBitmap());
                                }
                            }
                        });


                    } else {
                        // Error in login. Get the error message
                        String errorMsg = jObj.getString("error_msg");
                        Toast.makeText(getApplicationContext(),
                                errorMsg, Toast.LENGTH_LONG).show();
                    }
                } catch (JSONException e) {
                    // JSON error
                    e.printStackTrace();
                    Toast.makeText(getApplicationContext(), "Json error: " + e.getMessage(), Toast.LENGTH_LONG).show();
                }

            }
        }, new Response.ErrorListener() {

            @Override
            public void onErrorResponse(VolleyError error) {
                Log.e(TAG, "Login Error: " + error.getMessage());
                Toast.makeText(getApplicationContext(),
                        error.getMessage(), Toast.LENGTH_LONG).show();
                hideDialog();
            }
        }) {

            @Override
            public Map&lt;String, String&gt; getHeaders() {
                // Posting parameters to login url
                Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
                params.put("Authorization", apikey);


                return params;
            }


        AppController.getInstance().addToRequestQueue(strReq, tag_string_req);

        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        if (savedInstanceState == null) {
            Fragment fragment = null;
            Class fragmentClass = null;
            fragmentClass = ProfileFrag.class;
            try {
                fragment = (Fragment) fragmentClass.newInstance();
            } catch (Exception e) {
                e.printStackTrace();
            }

            FragmentManager fragmentManager = getSupportFragmentManager();
            fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();
        }

        FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
        fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });

        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
                this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        drawer.setDrawerListener(toggle);
        toggle.syncState();
        navigationView.setNavigationItemSelectedListener(this);

    }

    /**
     * Logging out the user. Will set isLoggedIn flag to false in shared
     * preferences Clears the user data from sqlite users table
     * */
    private void showDialog() {
        if (!pDialog.isShowing())
            pDialog.show();
    }

    private void hideDialog() {
        if (pDialog.isShowing())
            pDialog.dismiss();
    }
    public void logoutUser() {
        session.setLogin(false);

        db.deleteUsers();

        // Launching the login activity
        Intent intent = new Intent(MainActivity.this, LoginActivity.class);
        startActivity(intent);
        finish();
    }

    @Override
    public void onBackPressed() {
        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        if (drawer.isDrawerOpen(GravityCompat.START)) {
            drawer.closeDrawer(GravityCompat.START);
        } else {
            super.onBackPressed();
        }
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }else if(id == R.id.action_notif) {
            Intent i = new Intent(getApplicationContext(),
                    MapsActivity.class);
            startActivity(i);
        }else if(id == R.id.action_notif) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }

    @SuppressWarnings("StatementWithEmptyBody")
    @Override
    public boolean onNavigationItemSelected(MenuItem item) {
        // Handle navigation view item clicks here.
        int id = item.getItemId();
        Fragment fragment = null;
        Class fragmentClass = null;
        if (id == R.id.nav_profil) {
            fragmentClass = ProfileFrag.class;
        } else if (id == R.id.nav_home) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_history) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_ticket) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_remind) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_notif) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_maps) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_settings) {
            fragmentClass = MainTabFragment.class;
        } else if (id == R.id.nav_help) {
            fragmentClass = MainTabFragment.class;
        }
        try {
            fragment = (Fragment) fragmentClass.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        FragmentManager fragmentManager = getSupportFragmentManager();
        fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();

        DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
        drawer.closeDrawer(GravityCompat.START);
        return true;
    }
    @Override
    public void onFragmentInteraction(Uri uri) {

    }
}
</code></pre>

<p>this is my Error log :</p>

<pre><code>04-06 10:47:48.048 8919-8919/com.anakacara.anakacara E/AndroidRuntime: FATAL EXCEPTION: main
   Process: com.anakacara.anakacara, PID: 8919
   java.lang.RuntimeException: Unable to start activity ComponentInfo{com.anakacara.anakacara/com.anakacara.anakacara.MainActivity}: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
       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:5001)
       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:785)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
       at dalvik.system.NativeStart.main(Native Method)
    Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class android.support.design.widget.NavigationView
       at android.view.LayoutInflater.createView(LayoutInflater.java:620)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       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 android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
       at com.anakacara.anakacara.MainActivity.onCreate(MainActivity.java:69)
       at android.app.Activity.performCreate(Activity.java:5231)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
       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:5001) 
       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:785) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
       at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Constructor.constructNative(Native Method)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
       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 android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
       at com.anakacara.anakacara.MainActivity.onCreate(MainActivity.java:69) 
       at android.app.Activity.performCreate(Activity.java:5231) 
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
       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:5001) 
       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:785) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
       at dalvik.system.NativeStart.main(Native Method) 
    Caused by: android.view.InflateException: Binary XML file line #16: Error inflating class com.pkmmte.view.CircularImageView
       at android.view.LayoutInflater.createView(LayoutInflater.java:620)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
       at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(NavigationMenuPresenter.java:189)
       at android.support.design.widget.NavigationView.inflateHeaderView(NavigationView.java:258)
       at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:173)
       at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:95)
       at java.lang.reflect.Constructor.constructNative(Native Method) 
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
       at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
       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 android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276) 
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
       at com.anakacara.anakacara.MainActivity.onCreate(MainActivity.java:69) 
       at android.app.Activity.performCreate(Activity.java:5231) 
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
       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:5001) 
       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:785) 
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
       at dalvik.system.NativeStart.main(Native Method) 
    Caused by: java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Constructor.constructNative(Native Method)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:594)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
       at android.support.design.internal.NavigationMenuPresenter.inflateHeaderView(NavigationMenuPresenter.java:189) 
       at android.support.design.widget.NavigationView.inflateHeaderView(NavigationView.java:258) 
       at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:173) 
       at android.support.design.widget.NavigationView.&lt;init&gt;(NavigationView.java:95) 
       at java.lang.reflect.Constructor.constructNative(Native Method) 
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
       at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 
       at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
       at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
       at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
</code></pre>