Closed adolfogc closed 10 months ago
Hello, @adolfogc 👋. I've been able to reproduce the issue on my side and will review this with the team internally for next steps. Going to mark this as a bug and update this issue on progress as it's made! It look like Gradle 8 introduced a breaking change and we are going to work on adopting it/resolving it to fix the build issues tied to the namespace errors.
Just to confirm for other that find this until the fix is implemented, did the changes you made to your build.gradle
file completely resolves the issue for you?
Hi @cwomack, thank you for your reply! Yes, just adding that line to the build.gradle
fixed the error and allowed me to build the project.
Hi @adolfogc could you do my a favor, could you run the following command in your <project>/android
directory and paste the output?
./gradlew --version
Hi @HuiSF, this is the output:
------------------------------------------------------------
Gradle 8.0.1
------------------------------------------------------------
Build time: 2023-02-17 20:09:48 UTC
Revision: 68959bf76cef4d28c678f2e2085ee84e8647b77a
Kotlin: 1.8.10
Groovy: 3.0.13
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 17.0.8.1 (Eclipse Adoptium 17.0.8.1+1)
OS: Mac OS X 14.0 aarch64
Hi @HuiSF , @cwomack, this issue also affects other aws-amplify
packages, such as @aws-amplify/pushnotification
and @aws-amplify/rtn-push-notification
, as well as some dependency packages like react-native-get-random-values
. I will close the PR I submitted because the solution should probably fix the issue for all the aws-amplify
packages at once.
Just for reference, how they are tackling this issue in react-native-get-random-values
: https://github.com/LinusU/react-native-get-random-values/pull/48
Do you still have the logs of the build failure? @adolfogc
Didn't mean to close this issue with merging the PR. Reopen until the fix gets released.
Hi @HuiSF thank you for the fix, I looked at the PR (#12371) and wanted to bring to your attention that it seems like the pushnotification
package was left behind (https://github.com/aws-amplify/amplify-js/blob/main/packages/pushnotification/android/src/main/AndroidManifest.xml)
Hi @adolfogc thanks for the callout! I think this legacy push notification package is being deprecated.
The fix for this has been released and is available 6.0.5
as welll as 5.3.12
. I'll go ahead and mark this issue as closed, thank you!
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
Building the Android version of a RN application fails when using Gradle 8 due to missing namespace information.
The error can be fixed by adding the following to
build.gradle
:Expected behavior
The package should work when using Gradle 8.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response