how are you?
I am facing the error below when building the project locally with react-native. Even though I have installed Jdk and configured it, I receive this error. Any suggestions on how I can adjust this?
[RUN_GRADLEW] 1: Task failed with an exception.
[RUN_GRADLEW] -----------
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Script '/tmp/inspell-desenvolvimento/eas-build-local-nodejs/5cc7701e-0eb1-456a-adb1-d53c870b27be/build/node_modules/expo-modules-autolinking/scripts/android/autolinking_implementation.gradle' line: 356
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred evaluating project ':expo'.
[RUN_GRADLEW] > A problem occurred configuring project ':expo-modules-core'.
[RUN_GRADLEW] > Failed to notify project evaluation listener.
[RUN_GRADLEW] > SDK location not found. Define a valid SDK location with an ANDROID_HOME environment variable or by setting the sdk.dir path in your project's local properties file at '/tmp/inspell-desenvolvimento/eas-build-local-nodejs/5cc7701e-0eb1-456a-adb1-d53c870b27be/build/android/local.properties'.
[RUN_GRADLEW] > Could not get unknown property 'release' for SoftwareComponentInternal set of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] ==============================================================================
[RUN_GRADLEW] 2: Task failed with an exception.
[RUN_GRADLEW] -----------
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] A problem occurred configuring project ':expo'.
[RUN_GRADLEW] > compileSdkVersion is not specified. Please add it to build.gradle
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] ==============================================================================
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 20s
[RUN_GRADLEW] 10 actionable tasks: 10 executed
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
ENVIRONMENTAL VARIABLES:
#JAVA
JAVA_HOME=/home/inspell-desenvolvimento/java/jdk17
export JAVA_HOME
#PATH JAVA
PATH=$PATH:$JAVA_HOME/bin
export PATH
#JDK
ANDROID_HOME=/home/inspell-desenvolvimento/Android/Sdk
export ANDROID_HOME
FILE “local.properties”:
sdk.dir=/home/inspell-desenvolvimento/Android/Sdk
buildscript {
ext {
buildToolsVersion = findProperty('android.buildToolsVersion') ?: '33.0.0'
minSdkVersion = Integer.parseInt(findProperty('android.minSdkVersion') ?: '21')
compileSdkVersion = Integer.parseInt(findProperty('android.compileSdkVersion') ?: '33')
targetSdkVersion = Integer.parseInt(findProperty('android.targetSdkVersion') ?: '33')
kotlinVersion = findProperty('android.kotlinVersion') ?: '1.8.10'
frescoVersion = findProperty('expo.frescoVersion') ?: '2.5.0'
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.google.gms:google-services:4.4.2'
classpath('com.android.tools.build:gradle:7.4.2')
classpath('com.facebook.react:react-native-gradle-plugin')
}
}
I tried to access the path through the local.properties file in the project root
FILE “local.properties”:
sdk.dir=/home/inspell-desenvolvimento/Android/Sdk