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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -