react-native-gesture-handler icon indicating copy to clipboard operation
react-native-gesture-handler copied to clipboard

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

Open AyushG3112 opened this issue 7 years ago • 97 comments

I am using react-native v0.59.9 which uses gradle v5.4.1.

While building using ./gradlew assembleRelease, I get the warning

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

On running ./gradlew assembleRelease --warning-mode all, the warning changed to:

> Task :react-native-gesture-handler:generateReleaseRFile UP-TO-DATE
Changing the value for a property with a final value has been deprecated. This will fail with an error in Gradle 6.0.

AyushG3112 avatar Jun 15 '19 04:06 AyushG3112

I had the same problem

webxiaohe avatar Jun 28 '19 01:06 webxiaohe

+1 how to fix

zmGitHub avatar Jul 04 '19 06:07 zmGitHub

+1 and me

onebase4devcardle avatar Jul 05 '19 06:07 onebase4devcardle

Same error

ilmatt1991 avatar Jul 05 '19 19:07 ilmatt1991

I get following error in "react-native": "0.60.0", "react-native-gesture-handler": "^1.3.0", Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'.

jayan2019 avatar Jul 08 '19 05:07 jayan2019

+1 Same error with "react-native": "0.60.0", "react-native-gesture-handler": "^1.3.0"

sumankharel avatar Jul 08 '19 06:07 sumankharel

npm I jetifier npx jetify

Fixed it for me on react-native 0.60.0

jayan2019 avatar Jul 08 '19 06:07 jayan2019

the same for me! and @jayan2019 solution didn't solve it!

blueturtle13g avatar Jul 09 '19 10:07 blueturtle13g

@blueturtle13g I had build issue in react-native 0.60.0 If you have build issue, Use the following link. It will solve the build issue https://github.com/mikehardy/jetifier

jayan2019 avatar Jul 09 '19 10:07 jayan2019

@jayan2019 you right, following the library steps solved it. thanks!

blueturtle13g avatar Jul 10 '19 04:07 blueturtle13g

Things that worked for me: First, use Android Studio's refactoring tool to convert your app re: the Android developer docs npm install --save-dev jetifier npx jetify npx react-native run-android (your app should correctly compile and work) Call npx jetify run in the postinstall target of your package.json (Any time your dependencies update you have to jetify again)

Taken from: https://github.com/mikehardy/jetifier

SritomaMajumder avatar Jul 17 '19 09:07 SritomaMajumder

"react-native": "0.60.0" I had the same problem

washingtondeveloper avatar Jul 27 '19 00:07 washingtondeveloper

npm I jetifier npx jetify

Fixed it for me on react-native 0.60.0

I applied this in my RN0.60.0 and generate APK but still facing the same issue

TerrerSandman avatar Aug 06 '19 07:08 TerrerSandman

Same issue here (RN 0.60.0). Jetify doesn't fix it...

cpmech avatar Aug 13 '19 03:08 cpmech

same problem +1. Jetify didn't help

redko-o avatar Aug 20 '19 12:08 redko-o

Same problem. Jetify didn't help. React native version 0.60.5

AsmitaBhat30 avatar Aug 21 '19 11:08 AsmitaBhat30

Same problem, tried to reinstall, clear cache,etc. I was not able to solve it. please help "Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0."

nct0 avatar Aug 29 '19 18:08 nct0

I got this issue after set def enableSeparateBuildPerCPUArchitecture = true and def enableProguardInReleaseBuilds = true on android/app/build.gradle

Resolve after set back the value to false.

wachidyulio avatar Sep 02 '19 04:09 wachidyulio

@jayan2019 Thank you, You saved my time.

npm I jetifier npx jetify

These solved my problem.

ghost avatar Sep 03 '19 06:09 ghost

@jayan2019 's Solution worked for me as well, thanks.

Youssef-Tarek-Tewfik avatar Sep 09 '19 07:09 Youssef-Tarek-Tewfik