Android build.gradle namespace on AGP 8
Axiivy-Jaeseok opened this issue · 7 comments
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
Hello, I received a notification from Google requiring me to update the TargetSDK of my Android app to version 34. To comply with this, I migrated my Gradle version from 7 to 8. However, I encountered a namespace error during the process. Upon investigation, I found that AGP 8 requires the namespace to be explicitly defined in the android section of the build.gradle file. The other SDKs I am using manage this by conditionally defining the namespace based on the Gradle version. As a temporary fix, I manually defined and added the namespace, as shown in the attached image. I’m wondering if there are any plans to address this issue in a future update.
Thank you for your attention.
Expected Behavior
What you expected to happen?
Actual Behavior
What actually happens?
STACK TRACE AND/OR SCREENSHOTS
Reproducible Demo
- Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From
Examples
folder runnode create-app.js appName react-native@0.71.19 react-native-code-push@8.3.1
command to generate plain CodePushified React Native app. Please see description on top ofcreate-app.js
file content if needed - If you can't reproduce the bug on it, provide us as much info as possible about your project
Environment
- react-native-code-push version: 8.3.1
- react-native version: 0.72.4
- iOS/Android/Windows version:
- Does this reproduce on a debug build or release build?
- Does this reproduce on a simulator, or only on a physical device?
(The more info the faster we will be able to address it!)
Hello!
Thank you for reaching out to us. We will fix this issue and will keep you updated as soon as we have more details.
Thank you for your support! I appreciate your quick response and efforts to resolve the issue. I’ll close this issue.
I have the same problem and I hope the package maintainers update it quickly because 31th of this month is the last day. However, @Axiivy-Jaeseok did you manually add from node_modules/react-native-code-push/...?
Yes, I manually add namespace from node_modules/react-native-code-push/build.gradle
@Axiivy-Jaeseok are you having trouble in creating build or crash is happening on App?
We have successfully merged a pull request addressing this issue. The fix will be included in the upcoming release.
A fix for this issue was released with the AppCenter SDK ReactNative v9.0.0, so I'm closing this issue.