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

Unresolved reference: BuildConfig on expo-notifications 28 #28943

Closed
ampopdev opened this issue May 17, 2024 · 5 comments
Closed

Unresolved reference: BuildConfig on expo-notifications 28 #28943

ampopdev opened this issue May 17, 2024 · 5 comments
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues needs review Issue is ready to be reviewed by a maintainer

Comments

@ampopdev
Copy link

ampopdev commented May 17, 2024

Minimal reproducible example

https://github.com/ampopdev/demo-my-app-expo

What platform(s) does this occur on?

No response

Did you reproduce this issue in a development build?

Yes

Summary

Just run: yarn && npx react-native run-android on the minimal reproducible example. Then getting error:

MainApplication.kt:41:9 Unresolved reference: BuildConfig FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:compileDebugKotlin'

Tried adding android.defaults.buildfeatures.buildconfig=true in gradle.properties and buildConfig = true in build.gradle but didn't help as suggested here.

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.3.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.1.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v21.7.1/bin/yarn
npm: 10.7.0 - /opt/homebrew/bin/npm
Watchman: 2024.05.06.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.15.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.4, iOS 17.4, macOS 14.4, tvOS 17.4, visionOS 1.1, watchOS 10.4
IDEs:
Android Studio: 2023.2 AI-232.10227.8.2321.11479570
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
npmPackages:
expo: ^51.0.8 => 51.0.8
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
Expo Workflow: bare

Expo Doctor Diagnostics

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check native tooling versions
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!

@ampopdev ampopdev added the needs validation Issue needs to be validated label May 17, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 17, 2024
@AlexisKenAlvarez
Copy link

Im also having the issue on a newly created expo app
image

@ampopdev
Copy link
Author

@brentvatne are you able to reproduce the issue in the min reproducible example?

@brentvatne brentvatne added the incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues label May 29, 2024
@expo-bot
Copy link
Collaborator

Hi there! It looks like your issue requires a minimal reproducible example, but it is invalid or absent. Please prepare such an example and share it in a new issue.

The best way to get attention to your issue is to provide a clean and easy way for a developer to reproduce the issue on their own machine. Please do not provide your entire project, or a project with more code than is necessary to reproduce the issue.

A side benefit of going through the process of narrowing down the minimal amount of code needed to reproduce the issue is that you may get lucky and discover that the bug is due to a mistake in your application code that you can quickly fix on your own.

Resources

Common concerns

"I've only been able to reproduce it in private, proprietary code"

You may not have spent enough time narrowing down the root cause of the issue. Try out the techniques discussed in this manual debugging guide to learn how to isolate the problem from the rest of your codebase.

"I didn't have time to create one"

That's understandable, it can take some time to prepare. We ask that you hold off on filing an issue until you are able to fully complete the required fields in the issue template.

"You can reproduce it by yourself by creating a project and following these steps"

This is useful knowledge, but it's still valuable to have the resulting project that is produced from running the steps, where you have verified you can reproduce the issue.

@brentvatne
Copy link
Member

hey @ampopdev - that is not actually a minimal reproducible example, there are many extraneous dependencies. try creating a new project and adding pieces of that project to it until you are able to repro.

Minimal
The more code there is to go through, the less likely people can find your problem. Streamline your example in one of two ways:

Restart from scratch. Create a new program, adding in only what is needed to see the problem. Use simple, descriptive names for functions and variables – don’t copy the names you’re using in your existing code.
Divide and conquer. If you’re not sure what the source of the problem is, start removing code a bit at a time until the problem disappears – then add the last part back.

https://stackoverflow.com/help/minimal-reproducible-example

@ampopdev
Copy link
Author

ampopdev commented May 29, 2024

@brentvatne no problem, removed more dependencies, opened again here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
incomplete issue: missing or invalid repro A minimal reproducible example is required for most issues needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

4 participants