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