Kevin Bryan
Kevin Bryan

Reputation: 1858

React native Deprecated Gradle features when Builing apk

I'm trying to build my apk using ./gradlew bundleRelease but I always get this error:

error EISDIR: illegal operation on a directory, open 'P:\React'. Run CLI with --verbose flag for more details.
Error: EISDIR: illegal operation on a directory, open 'P:\React'

> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings

I also tried ./gradlew app:assembleRelease but I get the same error. I also created my project using npx.

Upvotes: 0

Views: 120

Answers (1)

Kevin Bryan
Kevin Bryan

Reputation: 1858

I tried everything, I even updated the project gradle verion but I would still get the same error. But the solution was just this:

cd android

clean your gradle:

./gradlew clean

then:

./gradlew assembleRelease -x bundleReleaseJsAndAssets

Upvotes: 1

Related Questions