software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
5.85k stars 954 forks source link

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

Closed AyushG3112 closed 3 years ago

AyushG3112 commented 4 years ago

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.
webxiaohe commented 4 years ago

I had the same problem

zmGitHub commented 4 years ago

+1 how to fix

onebase4devcardle commented 4 years ago

+1 and me

ilmatt1991 commented 4 years ago

Same error

jayan2019 commented 4 years ago

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'.

sumankharel commented 4 years ago

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

jayan2019 commented 4 years ago

npm I jetifier npx jetify

Fixed it for me on react-native 0.60.0

blueturtle13g commented 4 years ago

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

jayan2019 commented 4 years ago

@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

blueturtle13g commented 4 years ago

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

SritomaMajumder commented 4 years ago

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

washingtondeveloper commented 4 years ago

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

TerrerSandman commented 4 years ago

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

cpmech commented 4 years ago

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

redko-o commented 4 years ago

same problem +1. Jetify didn't help

AsmitaBhat30 commented 4 years ago

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

ThongNCT commented 4 years ago

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."

wachidyulio commented 4 years ago

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.

satish-m-p commented 4 years ago

@jayan2019 Thank you, You saved my time.

npm I jetifier npx jetify

These solved my problem.

Youssef-Tarek-Tewfik commented 4 years ago

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

waqaramjad commented 4 years ago

still same issue after trying all

jmandivarapu1 commented 4 years ago

+Same Issue for me..... anybody fixed it?

jayan2019 commented 4 years ago

+Same Issue for me..... anybody fixed it?

Which react-native version are you using? In "react-native": "0.60.5" already have jetifier on it.

vikramkh commented 4 years ago

+1 having this issue with 0.60.5

GoldenMaximo commented 4 years ago

+1 also having this issue with 0.60.5 jetify didn't work either

jdnichollsc commented 4 years ago

Same issue with RN 0.61.2 and also testing with jetifier

dickverbunt commented 4 years ago

Had the same issue. Turned out to be an easy fix. Remove the old version of the app on my device. maybe this will help others.

grimor77 commented 4 years ago

i had the same problem got fixed after i used File\Invalidate cache/restart of android studio

amkayondo commented 4 years ago

@jayan2019 thumbs up for you

JosefButzke commented 4 years ago

If using usb device try change usb port.

procarrera commented 4 years ago

It worked for me after I applied this:

node_modules\metro-config\src\defaults\blacklist.js

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

System: OS: Windows 10 CPU: (2) x64 AMD A4-6300 APU with Radeon(tm) HD Graphics Memory: 1.49 GB / 7.21 GB Binaries: Node: 12.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 23, 27, 28 Build Tools: 23.0.1, 27.0.3, 28.0.3 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5900203 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.3 => 0.61.3

procarrera commented 4 years ago

npm I jetifier npx jetify Fixed it for me on react-native 0.60.0

You saved me!! It worked for me after I applied this:

node_modules\metro-config\src\defaults\blacklist.js

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

System: OS: Windows 10 CPU: (2) x64 AMD A4-6300 APU with Radeon(tm) HD Graphics Memory: 1.49 GB / 7.21 GB Binaries: Node: 12.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 23, 27, 28 Build Tools: 23.0.1, 27.0.3, 28.0.3 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5900203 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.3 => 0.61.3

@jayan2019

Hi All, I realized that the problem was with the Node version... i changed to v 12.10... and all got fine, not necessary to change any node_modules manually, which is very bad for the development.

redeguzman-gbf commented 4 years ago

None of these solutions work

"react": "16.8.6" "react-native": "0.60.5"

procarrera commented 4 years ago

None of these solutions work

"react": "16.8.6" "react-native": "0.60.5"

Try to use node v12.10

ostli commented 4 years ago

I run

cd android && ./gradlew clean && ./gradlew :app:bundleRelease

It solved my problem.

AlmaJaneiro commented 4 years ago

Hi I used this :

https://stackoverflow.com/questions/51793345/android-material-and-appcompat-manifest-merger-failed/53202089

and it worked for me

RenanMomesso commented 4 years ago

It worked for me after I applied this:

node_modules\metro-config\src\defaults\blacklist.js

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

System: OS: Windows 10 CPU: (2) x64 AMD A4-6300 APU with Radeon(tm) HD Graphics Memory: 1.49 GB / 7.21 GB Binaries: Node: 12.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.19.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD SDKs: Android SDK: API Levels: 23, 27, 28 Build Tools: 23.0.1, 27.0.3, 28.0.3 IDEs: Android Studio: Version 3.5.0.0 AI-191.8026.42.35.5900203 npmPackages: react: 16.9.0 => 16.9.0 react-native: 0.61.3 => 0.61.3

Worked for me. react-native 0.61

hassanQureshi22 commented 4 years ago

This worked for me https://stackoverflow.com/a/51610775

asinex commented 4 years ago

use jetifier...it helped 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)

original link https://github.com/mikehardy/jetifier

mamkkl commented 4 years ago

I run

cd android && ./gradlew clean && ./gradlew :app:bundleRelease

It solved my problem.

Help a lot!! Cleaning the android project by using gradlew

jlcarruda commented 4 years ago

I've deleted my node_modules folder and run npm install again.

Now it works fine for me.

react-native: 0.61.5
react: 16.9.0
node: 12.13
PrayaAmadigaPitasa commented 4 years ago

I run

cd android && ./gradlew clean && ./gradlew :app:bundleRelease

It solved my problem.

it works, thanks

wallace-sf commented 4 years ago

I just updated my Node to 12.16.1 and worked.

conor909 commented 4 years ago

same issue on node: 12.16.1 & "react-native": "0.61.5"

makuraso123 commented 4 years ago

npm I jetifier npx jetify

Fixed it for me on react-native 0.60.0

gracias por el consejo y ayuda

NikitaBhutada commented 4 years ago

Try restarting metro server once . It worked perfectly for me.

denisluciano commented 4 years ago

I had the same problem and i solve reinstall version 8 of the Java SE Development Kit (JDK). In react native documentation is a getting started, in this part have how instal JDK. I use https://adoptopenjdk.net/ for download.In the site, bottom have part "instalation", so you can acess and select your SO(Sorry my english)

ImranHaiderBangash commented 4 years ago

i have the same problem withe react-native 0.61.5 plz help me i m beginner

mystic001 commented 4 years ago

To solve the problem you need to locate this file (gradle-wrapper.properties) The file is located in d path (android/gradle/wrapper) in your project folder....open the file and change this line distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip to this distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip

septe01 commented 4 years ago

I run

cd android && ./gradlew clean && ./gradlew :app:bundleRelease

It solved my problem.

thank u my project using RN "react": "16.8.1", "react-native": "^0.61.0",

yess It solved my problem.