AlexanderZaytsev / react-native-i18n

React Native + i18n.js
MIT License
2.18k stars 493 forks source link

Android Could not find method compile() for arguments [project ':react-native-i18n'] #299

Closed atjab closed 1 year ago

atjab commented 1 year ago

I'm build android then facing this issue. Could not find method compile() for arguments [project ':react-native-i18n'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. How to fix it. Thanks for your solutions

I use "react-native": "0.70.6", "react-native-i18n": "^2.0.15",

atjab commented 1 year ago

I down version to 2.0.14 and change setting in android/app/src/build.gradle to implementation project(':react-native-i18n'). Now, I get another error when build app to emulator. Native module tried to override RNI18nModule.

atjab commented 1 year ago

I remove packages.add(new RNI18nPackage()); in ./android/app/src/main/java/your/bundle/MainApplication.java This problem can resolved