android - Error in overriding onCreateView() method -
i new android.i trying link fragment file named "top_section_fragment" java class getting error while overriding oncreateview() method.error says "can not resolve symbol r" please me fix it.
package com.example.abdulrafay.myapplication; import android.os.bundle; import android.support.annotation.nullable; import android.support.v4.app.fragment; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; public class topsectionfragment extends fragment { @nullable @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view=inflater.inflate(r.layout.top_section_fragment,container,false); return view; } }
you're missing import:
import com.example.abdulrafay.myapplication.r;
if it's still not found, means wasn't generated.
in case, do: build -> rebuild project.
Comments
Post a Comment