Android Error: Task :expo-updates:kaptDebugKotlin FAILED
The problem
Trying to integrate in PlaidLink in android and get the following error I'm using latest Expo v.44 and dev client server to install native modules
Environment
| Plaid Link React Native | ^7.3.0 |
| ReactNative Version | 0.64.3 |
| Occurs on Android | e.g. yes |
Steps to Reproduce
- Repeat all the installation steps from the documentation
- Run expo:run android
Expected Result
Build succesfull
Logs
> Configure project :react-native-plaid-link-sdk
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
> Task :expo-updates:kaptDebugKotlin FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':expo-updates:kaptDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
I'm wondering whether this issue is the same as https://github.com/expo/expo/issues/15634, because the Android SDK transitively uses room.
Can you try updating room to the latest version?
dependencies {
implementation "com.plaid.link:sdk-core:3.8.0"
+ implementation "androidx.room:room-ktx:2.4.2"
}
I had a similar issue with a non-expo project.
Warning: The 'kotlin-android-extensions' Gradle plugin is deprecated.
Solution was to go to node_modules/react-native-plaid-link-sdk/android/build.gradle, and add:
android {
buildFeatures {
viewBinding true
}
}
Link: https://stackoverflow.com/a/65406997/9009196
Closing because Plaid Link React Native 7.x.x is no longer supported. If the issue persists in the latest SDK please open a new issue.