Closed hamdij0maa closed 9 months ago
Same here
@caiodeambrosio https://github.com/microsoft/react-native-code-push/pull/2649
getting same error not compatible with AGP 8.0
same (
same
I am also facing the same issue to upgrade the react-native version from 0.70.7 to 0.72.4 in android and also upgrade the react-native-code-push 8.1.1
Same here, using react-native 0.72.6 and react-native-code-push ^8.1.1
same here
Same here with react-native-code-push ^8.1.1
same here, any way to solve it
same issue, hope the PR gets looked at
Same issue when I update to 8.2.0 , too
i've commented the lines 63 and 64 of the file /node_modules/react-native-code-push/android/codepush.gradle and it works on my local setup but when i run in azure or appcenter throws the error again.
Here's the temporary patch file using patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle
index f701564..4faf49f 100644
--- a/node_modules/react-native-code-push/android/codepush.gradle
+++ b/node_modules/react-native-code-push/android/codepush.gradle
@@ -60,8 +60,8 @@ gradle.projectsEvaluated {
jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get()
resourcesDir = reactBundleTask.property('resourcesDir').asFile.get()
- new File(jsBundleDir).mkdirs()
- new File(resourcesDir).mkdirs()
+ jsBundleDir.mkdirs()
+ resourcesDir.mkdirs()
jsBundleFile = file("$jsBundleDir/$bundleAssetName")
Here's the temporary patch file using
patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle index f701564..4faf49f 100644 --- a/node_modules/react-native-code-push/android/codepush.gradle +++ b/node_modules/react-native-code-push/android/codepush.gradle @@ -60,8 +60,8 @@ gradle.projectsEvaluated { jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get() resourcesDir = reactBundleTask.property('resourcesDir').asFile.get() - new File(jsBundleDir).mkdirs() - new File(resourcesDir).mkdirs() + jsBundleDir.mkdirs() + resourcesDir.mkdirs() jsBundleFile = file("$jsBundleDir/$bundleAssetName")
Your solution works for me!
Here's the temporary patch file using
patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle index f701564..4faf49f 100644 --- a/node_modules/react-native-code-push/android/codepush.gradle +++ b/node_modules/react-native-code-push/android/codepush.gradle @@ -60,8 +60,8 @@ gradle.projectsEvaluated { jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get() resourcesDir = reactBundleTask.property('resourcesDir').asFile.get() - new File(jsBundleDir).mkdirs() - new File(resourcesDir).mkdirs() + jsBundleDir.mkdirs() + resourcesDir.mkdirs() jsBundleFile = file("$jsBundleDir/$bundleAssetName")
works! hope the PR gets approved and merged soon
I am also experiencing this issue. Thanks for the patch!
Here's the temporary patch file using
patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle index f701564..4faf49f 100644 --- a/node_modules/react-native-code-push/android/codepush.gradle +++ b/node_modules/react-native-code-push/android/codepush.gradle @@ -60,8 +60,8 @@ gradle.projectsEvaluated { jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get() resourcesDir = reactBundleTask.property('resourcesDir').asFile.get() - new File(jsBundleDir).mkdirs() - new File(resourcesDir).mkdirs() + jsBundleDir.mkdirs() + resourcesDir.mkdirs() jsBundleFile = file("$jsBundleDir/$bundleAssetName")
works for me thanks!
Here's the temporary patch file using
patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle index f701564..4faf49f 100644 --- a/node_modules/react-native-code-push/android/codepush.gradle +++ b/node_modules/react-native-code-push/android/codepush.gradle @@ -60,8 +60,8 @@ gradle.projectsEvaluated { jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get() resourcesDir = reactBundleTask.property('resourcesDir').asFile.get() - new File(jsBundleDir).mkdirs() - new File(resourcesDir).mkdirs() + jsBundleDir.mkdirs() + resourcesDir.mkdirs() jsBundleFile = file("$jsBundleDir/$bundleAssetName")
I'm using RN 0.73.2 and this solution worked for me, thanks 😊
Here's the temporary patch file using
patch-package
in case everyone needs it
react-native-code-push+8.2.0.patch
diff --git a/node_modules/react-native-code-push/android/codepush.gradle b/node_modules/react-native-code-push/android/codepush.gradle index f701564..4faf49f 100644 --- a/node_modules/react-native-code-push/android/codepush.gradle +++ b/node_modules/react-native-code-push/android/codepush.gradle @@ -60,8 +60,8 @@ gradle.projectsEvaluated { jsBundleDir = reactBundleTask.property('jsBundleDir').asFile.get() resourcesDir = reactBundleTask.property('resourcesDir').asFile.get() - new File(jsBundleDir).mkdirs() - new File(resourcesDir).mkdirs() + jsBundleDir.mkdirs() + resourcesDir.mkdirs() jsBundleFile = file("$jsBundleDir/$bundleAssetName")
For anyone patching manually using yarn berry + yarn patch react-native-code-push
on windows, the patch file may not be generated properly and will have extra diffs for a/windows-legacy/CodePush.Net46
, these need deleting from the patch file. It needs to look exactly as above (although I needed an extra carriage return for it to work) 🤷♂️
Verified on RN 0.73.2 System: CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Binaries: Node: 20.9.0 - ~\AppData\Local\Temp\xfs-b683883c\node.CMD Yarn: 4.0.2 - ~\AppData\Local\Temp\xfs-b683883c\yarn.CMD npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
The fix has been merged, reopened issue for now. Will close it once release with the fix available.
The fix available in the latest 8.2.1 release. Closing this issue.
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
Actual Behavior
/node_modules/react-native-code-push/android/codepush.gradle' line: 63