Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/394.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在其他活动中单击按钮时在一个活动中创建地图活动?_Java_Android_Xml_Button_Map - Fatal编程技术网

Java 如何在其他活动中单击按钮时在一个活动中创建地图活动?

Java 如何在其他活动中单击按钮时在一个活动中创建地图活动?,java,android,xml,button,map,Java,Android,Xml,Button,Map,我正在为一所大学创建一个android应用程序。我试图通过单击其他活动中的按钮来显示一个活动中的位置图。我已经参考了一些链接和工作,但我得到了错误。这是我的代码片段和Logcat。请任何人帮我做这件事 AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="co

我正在为一所大学创建一个android应用程序。我试图通过单击其他活动中的按钮来显示一个活动中的位置图。我已经参考了一些链接和工作,但我得到了错误。这是我的代码片段和Logcat。请任何人帮我做这件事

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.example.university"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />

<permission
    android:name="com.example.university.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.example.university.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature android:glEsVersion="0x00000000" android:required="true" />

<meta-data android:name="com.google.android.maps.v2.API_KEY"
    android:value="AIzaSyDGPcb88FGrYilWxe41RbWog38pSgNfp5o" />

<application android:allowBackup="true" android:icon="@drawable/launcher"
    android:theme="@style/Theme.AppCompat.Light" >
<activity android:name=".MainActivity" android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".About" android:label="@string/title_activity_about" >
</activity>
<activity android:name=".Chancellor"           android:label="@string/title_activity_chancellor" >
</activity>
<activity android:name=".Prochancellor"            android:label="@string/title_activity_prochancellor" >
</activity>
<activity android:name=".Programs"           android:label="@string/title_activity_programs" >
</activity>
<activity android:name=".Contact"           android:label="@string/title_activity_contact" >
</activity>
<activity android:name=".SplashActivity"            android:label="@string/title_activity_splash" >
</activity>
<activity android:name=".Admissions"             android:label="@string/title_activity_admissions" >
</activity>
<activity android:name=".Map" android:label="@string/title_activity_map" >
</activity>
</application>
</manifest>
activity_contact.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/tiny_grid"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.university.Contact" >

<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:src="@drawable/campus1" />

<TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/imageView1"
    android:layout_marginLeft="26dp"
    android:layout_toRightOf="@+id/imageView1"
    android:text="100 Feet Ring Road, BSK III Stage, Bangalore-560085"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView1"
    android:layout_below="@+id/textView1"
    android:text="+91 80 26721983"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView2"
    android:layout_below="@+id/textView2"
    android:text="+91 80 26722108"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView3"
    android:layout_below="@+id/textView3"
    android:autoLink="email"
    android:text="admissions@pes.edu"
    android:textSize="11dp" />

<ImageView
    android:id="@+id/imageView2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/imageView1"
    android:layout_marginTop="20dp"
    android:layout_toLeftOf="@+id/textView1"
    android:src="@drawable/campus2" />

<TextView
    android:id="@+id/textView5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView4"
    android:layout_alignTop="@+id/imageView2"
    android:text=" Hosur Road Campus (1 Km before Electronic City), Bangalore - 560 100"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView6"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView5"
    android:layout_below="@+id/textView5"
    android:text="+91 80 66186610"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView7"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView6"
    android:layout_below="@+id/textView6"
    android:text="+91 80 66186611"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView8"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView7"
    android:layout_below="@+id/textView7"
    android:autoLink="email"
    android:text="admissions@pes.edu"
    android:textSize="11dp" />

<ImageView
    android:id="@+id/imageView3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/imageView2"
    android:layout_marginTop="25dp"
    android:layout_toLeftOf="@+id/textView1"
    android:src="@drawable/campus3" />

<TextView
    android:id="@+id/textView9"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView8"
    android:layout_alignTop="@+id/imageView3"
    android:text="National Highway 219, Kuppam, Andhra Pradesh - 517 425"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView10"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView9"
    android:layout_below="@+id/textView9"
    android:text="085 70 256736"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView11"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView10"
    android:layout_below="@+id/textView10"
    android:autoLink="email"
    android:text="admissions@pes.edu"
    android:textSize="11dp" />

<ImageView
    android:id="@+id/imageView4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/imageView3"
    android:layout_marginTop="20dp"
    android:layout_toLeftOf="@+id/textView1"
    android:src="@drawable/campus4" />

<TextView
    android:id="@+id/textView12"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView11"
    android:layout_alignTop="@+id/imageView4"
    android:text="100 Feet Ring Road, BSK III Stage, Bangalore-560085"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView13"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView12"
    android:layout_below="@+id/textView12"
    android:text="+91 80 26721983"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView14"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView13"
    android:layout_below="@+id/textView13"
    android:text="+91 80 26722108"
    android:textSize="11dp" />

<TextView
    android:id="@+id/textView15"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/textView14"
    android:layout_below="@+id/textView14"
    android:autoLink="email"
    android:text="admissions@pes.edu"
    android:textSize="11dp" />

<Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageView4"
    android:layout_alignParentBottom="true"
    android:layout_marginLeft="16dp"
    android:text="Button" />

</RelativeLayout>
07-26 02:22:16.012: I/Process(2244): Sending signal. PID: 2244 SIG: 9
07-26 02:22:20.062: D/dalvikvm(2268): GC_FOR_ALLOC freed 86K, 7% free 2998K/3200K, paused 221ms, total 269ms
07-26 02:22:20.292: I/dalvikvm-heap(2268): Grow heap (frag case) to 6.783MB for 3932172-byte allocation
07-26 02:22:20.372: D/dalvikvm(2268): GC_FOR_ALLOC freed 2K, 3% free 6835K/7044K, paused 79ms, total 79ms
07-26 02:22:21.552: D/gralloc_goldfish(2268): Emulator without GPU emulation detected.
07-26 03:10:59.626: D/dalvikvm(2376): GC_FOR_ALLOC freed 90K, 7% free 2997K/3204K, paused 191ms, total 202ms
07-26 03:10:59.876: I/dalvikvm-heap(2376): Grow heap (frag case) to 6.782MB for 3932172-byte allocation
07-26 03:11:00.126: D/dalvikvm(2376): GC_FOR_ALLOC freed 2K, 4% free 6835K/7048K, paused 248ms, total 248ms
07-26 03:11:07.206: D/gralloc_goldfish(2376): Emulator without GPU emulation detected.
07-26 03:11:09.626: D/dalvikvm(2376): GC_FOR_ALLOC freed 57K, 3% free 7068K/7260K, paused 31ms, total 36ms
07-26 03:11:09.896: I/Choreographer(2376): Skipped 58 frames!  The application may be doing too much work on its main thread.
07-26 03:11:10.356: I/Choreographer(2376): Skipped 38 frames!  The application may be doing too much work on its main thread.
07-26 03:11:21.527: D/dalvikvm(2376): GC_FOR_ALLOC freed 1266K, 17% free 7055K/8436K, paused 173ms, total 176ms
07-26 03:11:25.347: D/AndroidRuntime(2376): Shutting down VM
07-26 03:11:25.357: W/dalvikvm(2376): threadid=1: thread exiting with uncaught exception (group=0xb0cefb20)
07-26 03:11:25.397: E/AndroidRuntime(2376): FATAL EXCEPTION: main
07-26 03:11:25.397: E/AndroidRuntime(2376): Process: com.example.university, PID: 2376
07-26 03:11:25.397: E/AndroidRuntime(2376): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.university/com.example.university.Map}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.os.Handler.dispatchMessage(Handler.java:102)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.os.Looper.loop(Looper.java:136)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.main(ActivityThread.java:5017)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.reflect.Method.invokeNative(Native Method)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.reflect.Method.invoke(Method.java:515)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at dalvik.system.NativeStart.main(Native Method)
07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.setContentView(Activity.java:1929)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.example.university.Map.onCreate(Map.java:20)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.performCreate(Activity.java:5231)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 11 more
07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.SupportMapFragment: make sure class name exists, is public, and has an empty constructor that is public
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:597)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:561)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.onCreateView(Activity.java:4778)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 24 more
07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.SupportMapFragment" on path: DexPathList[[zip file "/data/app/com.example.university-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.university-2, /system/lib]]
07-26 03:11:25.397: E/AndroidRuntime(2376):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:583)
07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 27 more
aaActivity_map.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.university.Map" >

<fragment
   android:id="@+id/map"
   android:name="com.google.android.gms.maps.SupportMapFragment"
   android:layout_width="match_parent"
   android:layout_height="match_parent"/>    

</RelativeLayout>

在应用程序中使用Google Maps时,您可能没有遵循所有步骤,因此有几件事情做错了:

  • Google Maps API密钥应该位于清单中的应用程序标记内
  • 您缺少play services元标记(也在应用程序标记中):


    您是否正在使用您的项目编译Google Play Services库?出现错误“com.Google.android.gms.maps.SupportMapFragment”,请检查您是否已将此类包含在项目中project@Charlesjean,我在我的项目中包括了这个类,但Logcat仍然出现!我错在哪里?是否包括支持库,我认为SupportMapFragment在支持库V4中。@Charlesjean,在我的项目->属性->Android->com.google.Android.gms.maps.MapFragment中没有作为库文件添加。我想这就是我被卡住的地方?帮助我!你的意思是我必须用你提到的代码替换这个?不,我的意思是将API键和我提供的另一个元标记移动到应用程序标记的内部:
    此处
    @Web相同的错误?尝试将片段的名称字段更改为
    android:name=“com.google.android.gms.maps.MapFragment”
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.university.Map" >
    
    <fragment
       android:id="@+id/map"
       android:name="com.google.android.gms.maps.SupportMapFragment"
       android:layout_width="match_parent"
       android:layout_height="match_parent"/>    
    
    </RelativeLayout>
    
    07-26 02:22:16.012: I/Process(2244): Sending signal. PID: 2244 SIG: 9
    07-26 02:22:20.062: D/dalvikvm(2268): GC_FOR_ALLOC freed 86K, 7% free 2998K/3200K, paused 221ms, total 269ms
    07-26 02:22:20.292: I/dalvikvm-heap(2268): Grow heap (frag case) to 6.783MB for 3932172-byte allocation
    07-26 02:22:20.372: D/dalvikvm(2268): GC_FOR_ALLOC freed 2K, 3% free 6835K/7044K, paused 79ms, total 79ms
    07-26 02:22:21.552: D/gralloc_goldfish(2268): Emulator without GPU emulation detected.
    07-26 03:10:59.626: D/dalvikvm(2376): GC_FOR_ALLOC freed 90K, 7% free 2997K/3204K, paused 191ms, total 202ms
    07-26 03:10:59.876: I/dalvikvm-heap(2376): Grow heap (frag case) to 6.782MB for 3932172-byte allocation
    07-26 03:11:00.126: D/dalvikvm(2376): GC_FOR_ALLOC freed 2K, 4% free 6835K/7048K, paused 248ms, total 248ms
    07-26 03:11:07.206: D/gralloc_goldfish(2376): Emulator without GPU emulation detected.
    07-26 03:11:09.626: D/dalvikvm(2376): GC_FOR_ALLOC freed 57K, 3% free 7068K/7260K, paused 31ms, total 36ms
    07-26 03:11:09.896: I/Choreographer(2376): Skipped 58 frames!  The application may be doing too much work on its main thread.
    07-26 03:11:10.356: I/Choreographer(2376): Skipped 38 frames!  The application may be doing too much work on its main thread.
    07-26 03:11:21.527: D/dalvikvm(2376): GC_FOR_ALLOC freed 1266K, 17% free 7055K/8436K, paused 173ms, total 176ms
    07-26 03:11:25.347: D/AndroidRuntime(2376): Shutting down VM
    07-26 03:11:25.357: W/dalvikvm(2376): threadid=1: thread exiting with uncaught exception (group=0xb0cefb20)
    07-26 03:11:25.397: E/AndroidRuntime(2376): FATAL EXCEPTION: main
    07-26 03:11:25.397: E/AndroidRuntime(2376): Process: com.example.university, PID: 2376
    07-26 03:11:25.397: E/AndroidRuntime(2376): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.university/com.example.university.Map}: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.access$800(ActivityThread.java:135)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.os.Handler.dispatchMessage(Handler.java:102)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.os.Looper.loop(Looper.java:136)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.main(ActivityThread.java:5017)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.reflect.Method.invokeNative(Native Method)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.reflect.Method.invoke(Method.java:515)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at dalvik.system.NativeStart.main(Native Method)
    07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:713)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.setContentView(Activity.java:1929)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivity.superSetContentView(ActionBarActivity.java:217)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivityDelegateICS.setContentView(ActionBarActivityDelegateICS.java:110)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.support.v7.app.ActionBarActivity.setContentView(ActionBarActivity.java:77)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at com.example.university.Map.onCreate(Map.java:20)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.performCreate(Activity.java:5231)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 11 more
    07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.google.android.gms.maps.SupportMapFragment: make sure class name exists, is public, and has an empty constructor that is public
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:597)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:561)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Activity.onCreateView(Activity.java:4778)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 24 more
    07-26 03:11:25.397: E/AndroidRuntime(2376): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.maps.SupportMapFragment" on path: DexPathList[[zip file "/data/app/com.example.university-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.university-2, /system/lib]]
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     at android.app.Fragment.instantiate(Fragment.java:583)
    07-26 03:11:25.397: E/AndroidRuntime(2376):     ... 27 more
    
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:20.+'
        compile 'com.google.android.gms:play-services:5.0.77'
    }