Open crisbal opened 1 year ago
same issue
Same issue here. It appears to be a gradle configuration issue from the library side. I found a similar issue for the "react-native-vector-icons" library Here. It seems there is a way to temporarily solve it by applying a patch. I would love to help, but sadly I lack on gradle skills I hope this can help. In the meantime, if someone knows an alternative to let the app build, please, let us know!
Update: I downgraded the gradle wrapper version from 8.0.1 to 7.5.1 and it builds both for debug and for release.
./android/gradle/wrapper/gradle-wrapper.properties:
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
+ distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
I know this is not ideal and we still need to do some tests to check if this change implied breaking the build at runtime.
Same issue. Unfortunately downgrading gradle is not an option.
Same issue here. It appears to be a gradle configuration issue from the library side. I found a similar issue for the "react-native-vector-icons" library Here. It seems there is a way to temporarily solve it by applying a patch. I would love to help, but sadly I lack on gradle skills I hope this can help. In the meantime, if someone knows an alternative to let the app build, please, let us know!
Update: I downgraded the gradle wrapper version from 8.0.1 to 7.5.1 and it builds both for debug and for release.
./android/gradle/wrapper/gradle-wrapper.properties:
- distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip + distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
I know this is not ideal and we still need to do some tests to check if this change implied breaking the build at runtime.
I tried this, it worked, but introduced other bugs.
Here is how I resolved it:
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
./gradlew clean
in /android
folderI downgraded OpenJDK 21 to Azul Zulu 17 solved my problem
Were you able to resolve the error? @crisbal @AbdurRobTanvir @Eliasdbr @cosminpwd
I'm having the same issue when migrating from Expo sdk 48 to 49.
According to this, it should be fixed by updating to v7.4.1(gradle 8 compatible). I tried but i'm still having the error.
I also installed via npm and followed the manual-installation procedure. But still same error 😢
Did i miss anything?
Were you able to resolve the error? @crisbal @AbdurRobTanvir @Eliasdbr @cosminpwd
I'm having the same issue when migrating from Expo sdk 48 to 49.
According to this, it should be fixed by updating to v7.4.1(gradle 8 compatible). I tried but i'm still having the error.
I also installed via npm and followed the manual-installation procedure. But still same error 😢
Did i miss anything?
Try downgrading the gradle wrapper version to 7.5.1 instead of 7.4.1 when building a debug build.
I do that when I need to make a debug APK, and when I need to make a release .AAB, I upgrade the Gradle wrapper back to 8.0.1
By the way, I'm using React Native v0.72.4.
One more thing: in the issue you shared, apparently, the RN devs fixed this on the 0.74.1 version of RN, but for the looks of the reactions, it didn't fixed the bug
Is there any other solution than downgrading gradle and react-native versions ?
Is this issue resolved? I'm still facing in below version
react-native: 0.73.0 @react-native-community/datetimepicker: 8.1.1
What went wrong: A problem was found with the configuration of task ':react-native-community_datetimepicker:packageDebugResources' (type 'MergeResources').
- Gradle detected a problem with the following location: '/Users/anshulthakur/WebstormProjects/cashe-newapp/node_modules/@react-native-community/datetimepicker/android/build/generated/res/resValues/debug'.
Reason: Task ':react-native-community_datetimepicker:packageDebugResources' uses this output of task ':@react-native-community_datetimepicker:generateDebugResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
- Declare task ':@react-native-community_datetimepicker:generateDebugResValues' as an input of ':react-native-community_datetimepicker:packageDebugResources'.
- Declare an explicit dependency on ':@react-native-community_datetimepicker:generateDebugResValues' from ':react-native-community_datetimepicker:packageDebugResources' using Task#dependsOn.
- Declare an explicit dependency on ':@react-native-community_datetimepicker:generateDebugResValues' from ':react-native-community_datetimepicker:packageDebugResources' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
Is this issue resolved? I'm still facing in below version
react-native: 0.73.0 @react-native-community/datetimepicker: 8.1.1
What went wrong: A problem was found with the configuration of task ':react-native-community_datetimepicker:packageDebugResources' (type 'MergeResources').
- Gradle detected a problem with the following location: '/Users/anshulthakur/WebstormProjects/cashe-newapp/node_modules/@react-native-community/datetimepicker/android/build/generated/res/resValues/debug'. Reason: Task ':react-native-community_datetimepicker:packageDebugResources' uses this output of task ':@react-native-community_datetimepicker:generateDebugResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Possible solutions:
- Declare task ':@react-native-community_datetimepicker:generateDebugResValues' as an input of ':react-native-community_datetimepicker:packageDebugResources'.
- Declare an explicit dependency on ':@react-native-community_datetimepicker:generateDebugResValues' from ':react-native-community_datetimepicker:packageDebugResources' using Task#dependsOn.
- Declare an explicit dependency on ':@react-native-community_datetimepicker:generateDebugResValues' from ':react-native-community_datetimepicker:packageDebugResources' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
I've resolved all community related package issues by just removing them from settings.gradle and app/build.gradle while migrating to 0.73.0 and gradle 8.3
Bug report
Summary
I am trying to run a debug release of my react-native app. It is a freshly created app with
react-native 0.72.4
andgradle 8
.I have never used Gradle so I am not fully sure if the issue is on me and my Gradle setup or something on your side.
I am on Windows, I have installed your library via
npm
and then followed the manual-installation procedureI have no idea why it complains about this task dependency and if that is the real problem.
Note (but I guess off-topic): I have had the library build successfully with
gradle 7
(by settingdistributionUrl
inandroid\gradle\wrapper\gradle-wrapper.properties
togradle 7
), but the "production" build would fail.Output of the build process
Environment info
Please ignore the NoSDK thing. I can compile without react-native-datetimepicker/datetimepicker just fine.
npx react-native info
output:react-native doctor
package.json