0
我要在我的應用程序中使用Google地圖V2,所以我在網上跟隨教程,如this。使用片段的錯誤
但是,當我在XML佈局和運行應用程序中使用片段標籤,就躍升到日食的DEBUG窗口(視圖)。
我檢查了我的代碼一行行,當我使用XML佈局片段標籤出現第一個錯誤!
我創建了一個測試應用程序(如下所示),並再次出現錯誤。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
和我的java類:
public class Main extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
我知道,當我在我的佈局中使用片段標籤,我會遇到錯誤。
你能告訴我什麼是錯的!
PLS添加logcat的錯誤文件 – Rahul 2014-12-13 12:37:15