0

I was trying to get current version name of my android studio project. after updating my Studio to 3.6.1 i am facing difficulty in importing BuildConfig

  • Does this answer your question? [Android Studio marks things in red with error message "cannot resolve symbol ...", but build succeeds](https://stackoverflow.com/questions/17421104/android-studio-marks-r-in-red-with-error-message-cannot-resolve-symbol-r-but) – Top-Master May 01 '22 at 12:17

1 Answers1

3

I've noticed this as well.

It was after a 'Clean Project' that AS forgot the import com.my_project.BuildConfig; statement.

Restoring the import statement manually wherever it was complaining about BuildConfig and then doing a 'Rebuild Project' seemed to work, at least until the next time.

Tip: don't accept the offered suggestion to import the class from ...compat.v4... you want the app level definition.

Update April 4th: The newly released AS 3.6.2 doesn't seem to suffer from this problem.

Community
  • 1
  • 1
pete
  • 313
  • 2
  • 10