title: google map android studio showing map error
body: <p>my app executed successfully , the problem is that i created button on the second XML layout that will take you to the map (class+layout) , i created method that take me to the class , but i face problems 
  which is :</p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
  Process: inducesmile.com.androidloginandregistration, PID: 1726
  android.content.ActivityNotFoundException: Unable to find explicit activity class {inducesmile.com.androidloginandregistration/inducesmile.com.androidloginandregistration.mapgs}; have you declared this activity in your AndroidManifest.xml?
     at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
     at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
     at android.app.Activity.startActivityForResult(Activity.java:3424)
     at android.app.Activity.startActivityForResult(Activity.java:3385)
     at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
     at android.app.Activity.startActivity(Activity.java:3627)
     at android.app.Activity.startActivity(Activity.java:3595)
     at inducesmile.com.androidloginandregistration.CustomerActivity.mapfragobject(CustomerActivity.java:190)
     at inducesmile.com.androidloginandregistration.CustomerActivity$1.onClick(CustomerActivity.java:85)
     at android.view.View.performClick(View.java:4438)
     at android.view.View$PerformClick.run(View.java:18422)
     at android.os.Handler.handleCallback(Handler.java:733)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     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)
  </code></pre>
  
  <p>i think the problem is in calling the object of the class</p>
  
  <p>onclick :</p>
  
  <pre><code>position.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {
              setContentView(R.layout.mapgs);
              mapfragobject(mapView );
  
          }
      });
  </code></pre>
  
  <p>calling method </p>
  
  <pre><code>public void mapfragobject (View view) {
      Intent intent = new Intent(this, mapgs.class);
      startActivity(intent);
  }
  </code></pre>
  
  <p>the new error after the first comment :</p>
  
  <pre><code>AndroidRuntime: FATAL EXCEPTION: main
  Process: inducesmile.com.androidloginandregistration, PID: 1741
  java.lang.RuntimeException: Unable to start activity ComponentInfo{inducesmile.com.androidloginandregistration/inducesmile.com.androidloginandregistration.mapgs}: java.lang.NullPointerException
     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: java.lang.NullPointerException
     at inducesmile.com.androidloginandregistration.mapgs.onCreate(mapgs.java:26)
     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)
  </code></pre>