は、私は、このウェブサイトを参照し
私の活動のコードでインフレータのエラーを取得し、私は得ることができないソリューション
私のXMLコード:
がライン#415バイナリXMLファイル:エラー膨張クラスフラグメント
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<fragment
android:id="@+id/projectcommends_combine"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.servicebellpartner.Fragment.ProjectComments"
tools:layout="@layout/project_comments"></fragment></RelativeLayout>
マイアクティビティコード:
public class OrderDetails extends AppCompatActivity implements View.OnClickListener {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.order_detail);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
ProjectComments projectComments = new ProjectComments(orderid);
fragmentTransaction.add(R.id.projectcommends_combine, projectComments);
fragmentTransaction.commit();
}}
マイ断片コード:
public class ProjectComments extends Fragment {
private String orderid;
public ProjectComments(String orderid){
this.orderid = orderid;
}
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.project_comments, container, false);
return view;
}}
は私が
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.servicebellpartner/com.servicebellpartner.Activity.OrderDetails}: android.view.InflateException: Binary XML file line #415: Error inflating class fragment
いずれかが解決策と説明を与えてください実行アプリでエラーの下に取得します。
お願い...スタックトレース全体を共有します... – W0rmH0le
スタックトレースとは何ですか? – vinoth12594
@vinothkumar: 'android.support.v4.app.Fragment'のフラグメントを使用していますか? –