Reputation: 21
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
Where: Build file 'E:\React_native\paperboy\node_modules\react-native-gesture-handler\android\build.gradle' line: 27
What went wrong: A problem occurred evaluating project ':react-native-gesture-handler'.
Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt
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. ==============================================================================
compileSdkVersion is not specified. Please add it to build.gradle
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. ==============================================================================
BUILD FAILED in 14s
at makeError (E:\React_native\paperboy\node_modules\execa\index.js:174:9)
at E:\React_native\paperboy\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\React_native\paperboy\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\React_native\paperboy\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
Upvotes: 2
Views: 247
Reputation: 5921
Try to remove the if..else
condition in your build.gradle
file under the signingConfigs
> release
.
Example:
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file('xxx')
storePassword 'xxx'
keyAlias 'xxx'
keyPassword 'xxx'
}
}
Upvotes: 0