I build android standalone but get error: Standalone build failed!

Hello,
This is my first time that I write a expo app. I create a barcode-scanner app for android. I already test on android device and it works. Then, I want to build standalone apk file to install on mobiles but when I run “expo build:android” I get “Standalone build failed!”

I use Visual Studio Code, Not installed Android Studio.

my expo sdk version: 32.0.0

my app.json:

{
  "expo": {
    "name": "expo-barcodescanner",
    "slug": "expo-barcodescanner",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
        "bundleIdentifier": "com.expo.barcodescanner",
        "supportsTablet": true
    },
    "android":{
        "package": "com.expo.barcodescanner"
    }
  }
}

build logs:

Parallel execution with configuration on demand is an incubating feature.

Configure project :app
AWS Device Farm Plugin version 1.3
Checking the license for package Android SDK Build-Tools 28.0.3 in /usr/local/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 27 in /usr/local/android-sdk-linux/licenses
Warning: License for package Android SDK Platform 27 not accepted.
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] A problem occurred configuring project ‘:app’.
[stderr] > Failed to install the following Android SDK packages as some licences have not been accepted.
[stderr] platforms;android-27 Android SDK Platform 27
[stderr] build-tools;28.0.3 Android SDK Build-Tools 28.0.3
[stderr] To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
[stderr] Alternatively, to transfer the license agreements from one workstation to another, see Exporting licenses - Android Studio Project Site
[stderr]
[stderr] Using Android SDK: /usr/local/android-sdk-linux
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 15s
Error: Process exited with non-zero code: 1
at ChildProcess.child.on (/app/node_modules/@expo/spawn-async/build/spawnAsync.js:39:21)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

best regards.

2 Likes

Experirncing the same issue since last week

1 Like

Same here this is licence agreement problem

[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] A problem occurred configuring project ‘:app’.
[stderr] > Failed to install the following Android SDK packages as some licences have not been accepted.
[stderr] platforms;android-27 Android SDK Platform 27
[stderr] build-tools;28.0.3 Android SDK Build-Tools 28.0.3
[stderr] To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
[stderr] Alternatively, to transfer the license agreements from one workstation to another, see Exporting licenses - Android Studio Project Site
[stderr]
[stderr] Using Android SDK: /usr/local/android-sdk-linux
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 13s
Error: Process exited with non-zero code: 1
at ChildProcess.child.on (/app/node_modules/@expo/spawn-async/build/spawnAsync.js:39:21)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

1 Like

the same here any solutions?

2 Likes

the same issue is here…
How can I fix it…

3 Likes

same problem , please help

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.