-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Task :app:generateBundledResourcesHashRelease FAILED #1977
Description
For some reasons i don't have src with my js files folder, but i have the index.android.bundle generated from js files.
Then in my app/build.gradle i have this flag bundleInRelease: false, this means that bundle.js and generated folder don't will be created.
I already tried to manually create this folder, but i'm using appcenter build service and before run generateBundledResourcesHashRelease the Task :app:clean clean and remove this folder, i already tried to create folder with sudo to avoid remove it, but then the clean task fail.
I don't know what do, i found some issues about that and tried to copy these solutions, but without success, if someone can help me i will be very happy =)
Steps to Reproduce
- react-native init codepush-issue
- cd codepush-issue
- yarn add react-native-code-push
- react-native link react-native-code-push
- Configured release signing.
- cd android
- ./gradlew bundleRelease
Expected Behavior
Build & run on Android without errors
Actual Behavior
The build fails with the following message:
> Task :app:generateBundledResourcesHashRelease FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.3/userguide/command_line_interface.html#sec:command_line_warnings
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, scandir '/Users/runner/work/1/s/android/app/build/generated/res/react/release'
at Object.readdirSync (fs.js:955:3)
at getFilesInFolder (/Users/runner/work/1/s/node_modules/react-native-code-push/scripts/getFilesInFolder.js:7:26)
at Object.<anonymous> (/Users/runner/work/1/s/node_modules/react-native-code-push/scripts/generateBundledResourcesHash.js:38:1)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/runner/work/1/s/android/app/build/generated/res/react/release'
}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateBundledResourcesHashEdpRelease'.
Reproducible Demo
- Download https://github.com/microsoft/react-native-code-push/archive/master.zip and unzip. From
Examples
folder runnode create-app.js appName [email protected] [email protected]
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
- Platform: Android
- react-native-code-push version: 6.0.0
- react-native version: 0.61.5
- Does this reproduce on a debug build or release build? Release
- Does this reproduce on a simulator, or only on a physical device? Both, because the app can't be builded.