Cannot resolve symbol R.

0 Joris Willig · April 21, 2015
So I coded along with video number 26, but the first argument for he inflater.inflate isn't working. As said in the title, the compiler can't resolve symbol R. Can anyone help me with this?

package com.joriswillig.memecreator;

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 TopFragment extends Fragment {

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
// This is where it goes wrong.
        View view = inflater.inflate(R.layout.top_fragment, container, false);
        return view;
    }
}


Post a Reply

Replies

Oldest  Newest  Rating
0 Kuroodo Ditory · April 21, 2015
Please use the search function next time. There is already a similar thread about this https://www.thenewboston.com/forum/topic.php?id=5654


If your problem still isn't solved, continue adding to that other thread .
  • 1

Java / Android Development

107,168 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator