Olá pessoal
Preciso de um help, estou recebendo essa mensagem abaixo. Antes recebia error tunning app, fiz a busca pela lupa e consegui configurar um emulador, mas agora esse outro problema, porem ajudar favor
failed
:app:compileDebugJavaWithJavac
FirstFragment.java
package alura.com.agenda_alura.databinding does not exist
cannot find symbol class FragmentFirstBinding
cannot find symbol variable FragmentFirstBinding
package R does not exist
Main.java
cannot find symbol class Activity
SecondFragment.java
package alura.com.agenda_alura.databinding does not exist
cannot find symbol class FragmentSecondBinding
cannot find symbol variable FragmentSecondBinding
package R does not exist
package alura.com.agenda_alura;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.navigation.fragment.NavHostFragment;
import alura.com.agenda_alura.databinding.FragmentFirstBinding;
public class FirstFragment extends Fragment {
private FragmentFirstBinding binding;
@Override
public View onCreateView(
LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState
) {
binding = FragmentFirstBinding.inflate(inflater, container, false);
return binding.getRoot();
}
public void onViewCreated(@NonNull View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
binding.buttonFirst.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
NavHostFragment.findNavController(FirstFragment.this)
.navigate(R.id.action_FirstFragment_to_SecondFragment);
}
});
}
@Override
public void onDestroyView() {
super.onDestroyView();
binding = null;
}
}