I was attempting to add react-native-health-connect to our React Native app. After adding this library, I changed the minimum SDK to 26 and the compileSdkVersion to 34. Following these changes, the following error appeared:
The class is loaded from /Users/apple/.gradle/caches/transforms-3/b60c0c5574f97806b258b157ffbff0eb/transformed/jetified-connect-client-1.1.0-alpha06-api.jar!/androidx/health/connect/client/units/Power.class
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong:
Execution failed for task ‘:react-native-health-connect:compileDebugKotlin’.
Execution failed for task ‘:react-native-health-connect:compileDebugKotlin’.
2
Answers
I changed kotlinVersion = '1.6.10' to kotlinVersion = '1.8.0', and added the @shopify/flash-list library with version 1.6.1. The application is now working fine.
Thank you so much. i am looking for it from the past 5 days and today i finally got it . It works for me fine.