私は付属のXMLレイアウトで空白フラグメントを作成するにもかかわらず。私の断片のjavaのdont connetフラグメントレイアウト

DRITAラーマン:

ここではエラーとJavaコードであります

public class fragemnt extends Fragment {


public fragemnt() {
    // Required empty public constructor
}


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    return inflater.inflate(R.layout.fragment_fragemnt, container, false);
}

}

ここに私のjavaFragmentは、レイアウトdirecotryでFragement_fragmentレイアウト本家xmlファイルショーを見つけることができません

HERESに私のxmlファイル

 <?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
    tools:context=".FirstSemester.fragemnt">

    <!-- TODO: Update blank fragment layout -->
    <TextView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="@string/hello_blank_fragment" />

</FrameLayout>
アニスmarzouk:

ビルドには、クリックをきれいにしてみてください。それは無効化キャッシュと再起動しようと動作しなかった場合

ここでは、画像の説明を入力します。

おすすめ

転載: http://10.200.1.11:23101/article/api/json?id=374750&siteId=1