0

i'm trying to build my expo project to android using eas build -p android, but i keep getting this error:

[RUN_GRADLEW] FAILURE: Build completed with 2 failures.
[RUN_GRADLEW] 1: Task failed with an exception.
[RUN_GRADLEW] -----------
[RUN_GRADLEW] * Where:
[RUN_GRADLEW] Script '/tmp/curtis/eas-build-local-nodejs/3263ad7d-6f3a-4eab-87d0-78b49892e522/build/node_modules/expo-modules-autolinking/scripts/android/autolinking_implementation.gradle' line: 272
[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/curtis/eas-build-local-nodejs/3263ad7d-6f3a-4eab-87d0-78b49892e522/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 8m 47s

my app.json is this:

{ "expo": { "name": "APP_NAME", "slug": "APP_SLUG", "version": "1.2.3", "orientation": "portrait", "icon": "./assets/icon.png", "userInterfaceStyle": "light", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#000000" }, "updates": { "fallbackToCacheTimeout": 0 }, "assetBundlePatterns": [ "**/*" ], "ios": { "supportsTablet": true }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#000000" }, "package": "com.APP_NAME.app", "versionCode": 10 }, "web": { "favicon": "./assets/favicon.png" }, "extra": { "eas": { "projectId": "PROJECT_ID" } }, "plugins": [ [ "expo-build-properties", { "android": { "compileSdkVersion": 31, "targetSdkVersion": 31, "buildToolsVersion": "31.0.0" }, "ios": { "deploymentTarget": "13.0" } } ], [ "expo-image-picker", { "photosPermission": "The app accesses your photos to let Upload Profile Pictures" } ], [ "expo-local-authentication", { "faceIDPermission": "Allow to use Face ID." } ], "expo-build-properties" ] } }

i even tried installing wsl and using eas build --local to try it locally but i still get the same issue, please how can i sole this?

Curtis Crentsil
  • 459
  • 6
  • 20

0 Answers0