android build fails on local build
See original GitHub issuehi,
i try to build an android app locally on gitlab. but i get a general bug i can’t do anything with. on the public expo server the app can be built successfully.
When building the system i followed the following documentation:
- https://docs.expo.io/distribution/turtle-cli/
- https://www.robincussol.com/build-standalone-expo-apk-ipa-with-turtle-cli/
I hope you can help me and thank you for your time!
Dockerfile
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y sudo curl && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -y jq yarn nodejs wget ruby-dev gcc g++ make python build-essential openjdk-8-jdk-headless git && \
gem install fastlane
RUN npm install -g turtle-cli gulp-cli expo-cli --unsafe-perm=true --allow-root
Build Steps
# tried both
SDK_VERSION=37.0.0
SDK_VERSION=36.0.0
# bundle and deploy to web
yarn install
expo export --public-url https://expo.benkner-it.de
# deploy to https://expo.benkner-it.de
rm -rf /share/*
cp -rf dist/* /share/
# build app
turtle setup:android --sdk-version $SDK_VERSION
turtle build:android --type apk --keystore-path ./debug.keystore --keystore-alias "keyalias" --public-url https://expo.benkner-it.de/android-index.json
Error
May 4 19:52:28 turtle[510] ERROR: Error: ./gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/usr/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:417:26)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at spawnAsync (/usr/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at spawnAsyncThrowError (/@expo/xdl@57.8.30/src/detach/ExponentTools.ts:100:19)
at buildShellAppAsync (/@expo/xdl@57.8.30/src/detach/AndroidShellApp.js:1290:11)
at Object.createAndroidShellAppAsync (/@expo/xdl@57.8.30/src/detach/AndroidShellApp.js:345:5)
at runShellAppBuilder (/usr/lib/node_modules/turtle-cli/src/builders/android.ts:91:5)
at buildAndroid (/usr/lib/node_modules/turtle-cli/src/builders/android.ts:23:26)
at /usr/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:87:7
at Command.<anonymous> (/usr/lib/node_modules/turtle-cli/src/bin/index.ts:23:12)
platform: "android"
May 4 19:52:28 turtle[510] ERROR: Failed to build standalone app
err: Error: ./gradlew exited with non-zero code: 1
at ChildProcess.completionListener (/usr/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:417:26)
at ChildProcess.emit (events.js:310:20)
at ChildProcess.EventEmitter.emit (domain.js:482:12)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
...
at spawnAsync (/usr/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at spawnAsyncThrowError (/@expo/xdl@57.8.30/src/detach/ExponentTools.ts:100:19)
at buildShellAppAsync (/@expo/xdl@57.8.30/src/detach/AndroidShellApp.js:1290:11)
at Object.createAndroidShellAppAsync (/@expo/xdl@57.8.30/src/detach/AndroidShellApp.js:345:5)
at runShellAppBuilder (/usr/lib/node_modules/turtle-cli/src/builders/android.ts:91:5)
at buildAndroid (/usr/lib/node_modules/turtle-cli/src/builders/android.ts:23:26)
at /usr/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:87:7
at Command.<anonymous> (/usr/lib/node_modules/turtle-cli/src/bin/index.ts:23:12)
platform: "android"
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
React Native Android build failure with different errors without ...
Reason for Failures : The build failures for Android was due to the publish of the React Native version 0.71. 0-rc0 to Maven...
Read more >Build fails in android-build@1.0 - Bitrise Discussions
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with...
Read more >Known issues with Android Studio and Android Gradle Plugin
This error occurs on Linux-based platforms when starting the native debugger. It indicates that one of the libraries required by the native debugger...
Read more >Android build fails with Android SDK Build-Tools 31.0.0 #1288
The build seems to ignore the pinned Android Build-Tools version. This issue started appearing in our build pipeline between July 19., 13:20 UTC ......
Read more >Gradle build fails with build tools 31.0.0 - Unity Forum
go to the location "C:\Users\user\AppData\Local\Android\Sdk\build-tools\31.0.0" · find a file named d8.bat. This is a Windows batch file. · rename ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is the command that we use for generating a keystore on our servers:
(reference: https://github.com/expo/expo-cli/blob/master/packages/xdl/src/credentials/AndroidCredentials.ts#L260) The only major difference between your command and ours is that we use the Android package for
CN
and we leave other fields empty. You use “Tobias Benkner” forCN
- and to be honest I’m not sure if it’s valid.Side note - you shouldn’t be generating a new keystore for every build. Once you upload the app to Google Play Store, you need to sign the further versions of the app with the same keystore.
In case someone else comes across this. You can convert a PKCS12 keystore to JKS with the following
Source