Android Compile Error
I met android compile error. react-native: 0.63.2 react-native-notifications: 3.3.0
Log is like this. react-native-notifications: 3.2.2 works good.
1: Task failed with an exception.
-
Where: Build file '/node_modules/react-native-notifications/lib/android/app/build.gradle' line: 4
-
What went wrong: A problem occurred evaluating project ':react-native-notifications'.
Plugin with id 'kotlin-android' not found.
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
2: Task failed with an exception.
- What went wrong: A problem occurred configuring project ':react-native-notifications'.
compileSdkVersion is not specified. Please add it to build.gradle
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
-
Get more help at https://help.gradle.org
Based on a suggestion for another library producing a similar error, I have applied the following changes. They seem to work. The following code demonstrates ONLY the changes. I am NOT suggesting deleting the rest of the code in the file.
File: android/build.gradle
buildscript {
ext {
minSdkVersion = 21 // change this one from 16 to 21
// kotlinVersion = "1.3.72" // add this line (July 2020)
kotlinVersion = "1.6.0" // add this line (Nov 2021)
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" // add this line
}
}
It do not work.
The problem: Received close_notify during handshake
Same issue for me... RN 0.63.2, react-native-notifications 3.3.2
Same issue for me.
RN 0.63.2 react-native-notifications 3.3.2
Same issue for me
RN 0.63.2 React native notifications 3.3.2
Based on a suggestion for another library producing a similar error, I have applied the following changes. They seem to work. The following code demonstrates ONLY the changes. I am NOT suggesting deleting the rest of the code in the file. File:
android/build.gradlebuildscript { ext { minSdkVersion = 21 // change this one from 16 to 21 kotlinVersion = "1.3.72" // add this line } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" // add this line } }
Dropping Android 4 support is no solution for us.
Why was this changed in a recent release? Does the library require this now? The docs do not include any information and there are no changelogs.
Same issue for me
RN 0.63.2 React native notifications 3.3.2
Same for me. RN 0.62.2 React native notifications 3.3.2
Same for me. RN 0.62.2 React native notifications 3.3.2
Same for me. RN 0.63.2 React native notifications 3.3.2
Same for me. RN 0.63.2 React native notifications 3.3.2
Same for me RN 0.63.2 React native notifications 3.3.2
Issue:
ERROR: Plugin with id 'kotlin-android' not found.
+1
The solution proposed by @Bilal-Abdeen works but the app crash on startup. It now compile properly though.
@clamiax Try the following
- cd <proj_folder>/android
- gradlew clean
- cd ..
- npx react-native run-android
@Bilal-Abdeen I already tried but with no luck. The app keep crashing on startup.
EDIT: I currently "solved" with react-native-push-notification.
+1
Same for me. RN 0.63.2 React native notifications 3.3.2
The same issue +1.
RN 0.63.2 React native notifications 3.3.2
Same for me