SDK Version: 44
Platforms(Android/iOS/web/all): Android
Command expo run:android
failed with following Error Log
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle ‘plugins { … }’ DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add ‘apply false’ to the plugin line.
See: Using Plugins
The Kotlin plugin was loaded in the following projects: ‘:expo-updates-interface’, ‘:react-native-pdf-thumbnail’
Task :expo-updates:kaptGenerateStubsDebugKotlin FAILED
e: [kapt] ‘com.sun.tools.javac.util.Context’ class can’t be found (‘tools.jar’ is absent in the plugin classpath). Kapt won’t work.
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:expo-updates:kaptGenerateStubsDebugKotlin’.
Compilation error. See log for more details
-
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface
BUILD FAILED in 17s
787 actionable tasks: 4 executed, 783 up-to-date
/Users/user/Projects/App/android/gradlew exited with non-zero code: 1
Error: /Users/user/Projects/App/android/gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:483:26)
at ChildProcess.emit (events.js:376:20)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
…
at spawnAsync (/usr/local/lib/node_modules/expo-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at spawnGradleAsync (/usr/local/lib/node_modules/expo-cli/src/commands/run/android/spawnGradleAsync.ts:83:18)
at assembleAsync (/usr/local/lib/node_modules/expo-cli/src/commands/run/android/spawnGradleAsync.ts:57:16)
at actionAsync (/usr/local/lib/node_modules/expo-cli/src/commands/run/android/runAndroid.ts:143:9)
My Questions are
How to remove the plugins from android subprojects using app.config.js or config-plugins?
Is there any other way to resolve it without making change in subprojects in root android folder (As it’s not recommended to modify native projects)