-
Notifications
You must be signed in to change notification settings - Fork 2
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
MainApplication.kt: Unresolved reference: BuildConfig #263
Comments
Same, and also => Unresolved reference: PackageList |
For me it was a missing import in the MainApplication.kt file:
though that's not in the default project so doesn't show up on upgrade-helper. It's something to do with Android Gradle Plugin (AGP) 8 I think. EDIT: See my later comment |
I stumbled upon this with same issue. I thought it was odd I didn't have that BuildConfig import, but my machine and others worked fine with debug & release builds. It was only our CI pipeline having an issue. I haven't yet added the BuildConfig import myself, but something isn't adding up here. |
I revisited this and it turns out that the |
Thanks - we figured out our root issue as well. During the jump from 72 to 73 we changed to Kotlin |
@thymikee @JeremyBradshaw7 @iBotPeaches not resolved for me i am also facing same issue |
There's a solid amount of context and details in this thread. Paired with your message of pinging 3 people with absolutely zero context I don't see how you expect this to go. |
Same problem. Nothing solved it for me EDIT: using android studio and following the following steps just resolved this issue for me. Android Studio -> Build -> Clean Project -> rebuild project doing this generated a buildConfig file in my com.myapp.com.BuildConfig and I just imported it. |
I had the same problem and I fixed it when i found that the first line in MainActivity.kt is importing the wrong appname |
i same problem, "expo": "~51.0.20", |
I had the same issue and none of these solutions worked for me. The problem was because of this line in the Removing this line fixed the issue in |
Had a typo in namespace in build.gradle as suggested by JeremyBradshaw7 |
@iBotPeaches how are you renaming the packages now? Did you figure out an alternative to using https://github.com/joshdholtz/fastlane-plugin-rename_android_package? |
@CaptainJeff - We forked it and I pinged the author of that plugin a few times and offered a PR to fix, but it looks abandoned. https://github.com/sourcetoad/fastlane-plugin-rename_android_package Generally just add this to
|
@iBotPeaches oh incredible. Thanks so much for 1) the fork 2) getting back to me so fast. Appreciate it! |
Thanks so much! |
I'm solved the issue by adding |
I Solved this issue by adding |
i cannot get it work |
Environment
Things I’ve done to figure out my issue
Upgrading version
0.73.5
Description
Android build has these errors in ./gradlew build command:
MainApplication.kt has the same references to BuildConfig as a brand new react native typescript project, which doesn't break in the same way, so this is very odd.
After some googling of the error I've tried adding this to my build.gradle, but it hasn't helped:
My MainApplication.kt file:
Been stuck on this a day - please help!
The text was updated successfully, but these errors were encountered: