我正在尝试我的手和Android应用程序开发.我目前正在使用Eclipse(我不记得版本,无论最新版本是什么).我越过了一座桥,在那里我似乎无法理解我做错了什么.我正在尝试使用Google Maps V2 API.我已经浏览了几个文档并尝试了几种技术,所有这些都导致了同样的错误:
Android.view.Inflate Exception: Binary XML file line #2: Error inflating class fragment
Run Code Online (Sandbox Code Playgroud)
我一直在把钥匙砸到钥匙上2天,试图抓住我在这里做错了什么.
我做过的事情:
a library.android-support-v4.jar在我的项目的依赖项中.我从类似于我的问题尝试了很多不同的答案,但无济于事.:(我通常可以解决这些问题,但也许我太过分了.
我在eclipse中的包浏览器树看起来像
这是代码:>
activity_main.xml中
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
Run Code Online (Sandbox Code Playgroud)
表现
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.testing.svma"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" …Run Code Online (Sandbox Code Playgroud)