Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find type 'R' in the scope #894

Open
artxcoder opened this issue May 2, 2024 · 1 comment
Open

Cannot find type 'R' in the scope #894

artxcoder opened this issue May 2, 2024 · 1 comment

Comments

@artxcoder
Copy link

I have updated the pod to latest version (7.3.2). Generated the R.generated.swift file after build and dragged and dropped the file into project folder.

When I start running the app, it shows Cannot find type 'R' in scope

Uploading Screenshot 2024-05-02 at 11.32.29 AM.png…

@mrgsdev
Copy link

mrgsdev commented May 7, 2024

I just had this error.
What worked for me:

  1. Remove R.generated.swift via Xcode "Move to trash"
    also remove it from the recycle bin permanently
    you're gonna get these errors Cannot find 'R' in scope
  2. Press Command+R
    you'll have Build Failed, but you'll still have autocreated R.generated.swift
  3. Drag and drop the file to the root of the folder where *.xcworkspace and *.xcodeproj are located.
    Example:
    /Users/mrgsdev/Desktop/PROJECT_NAME/PROJECT_NAME.xcworkspace
    /Users/mrgsdev/Desktop/PROJECT_NAME/R.generated.swift
  4. tick the Copy items if needed checkbox
  5. Command+B

P.S I didn't have autogeneration of new colours and so on working, this helped me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants