I want to build an apk file, I added 2 steps (Script 1.1.4 and Deploy to Bitrise.io).
When a project is building i have error "script@1.1.4 (exit code: 1) ", what does it mean?
And in top i have alert :
âYou may be on the wrong stack to build this kind of project. Your current stack is: Android & Docker, on Ubuntu 14.04 - LTS Stack (pre-installed tools)â
Thatâs just a warning/notice/reminder. Wrong stack is quite a frequent issue, especially in case of the Mac stacks where the Xcode version matters quite a lot. If youâre sure youâre on the right stack just ignore this
That means that your script exited with an exit code 1. Only exit code 0 means success - this is a standard command line tool thing; anything other than exit code 0 means âthe command failedâ.
Now which command failed, that depends on your script, what you defined as the script.
If you have a Bash script Iâd suggest you to keep the default top part of it:
#!/bin/bash
# fail if any commands fails
set -e
# debug log
set -x
# write your script here
...
In short, set -e enables âfail if any command failsâ (exit with a non 0 exit code) and set -x means âprint every command before executing the commandâ. If you have both then youâll see which command failed in the log (right above the exit code: 1 line).
I followed your advice and how much I understood my error in this line
"Illegal option: /android.keystore
keytool -genkeypair [OPTION]âŚ"
How can I solve this problem?
Can you please include the whole log of this step, and maybe the script content too? Would make it way easier and faster to help you with the debugging
Iâd also suggest you to check these guides, to help with local debugging on your Mac/Linux:
This seems like you provided an invalid parameter/option to the keytool command. Might be that you provided an invalid path - from this it seems the path specified was /android.keystore which should probably be ./android.keystore, as if the path starts with a / that means the file system root, not the repo root or the current directory.
In general, I succeeded build project.
I use this script:
#!/bin/bash_
set -e_
set -x_
mkdir -p keystore
echo y | keytool -genkeypair -dname "cn=Test, ou= Test, o= Test, c= Test " \
-alias TestTest -keypass TestTest -keystore /keystore \
-storepass TestTest -validity 25
But when i downloaded âsrc.zipâ in it was empty folder âkeystoreâ.
I tried to ignore this, I put this folder in my project root and set up my gradle like this
I changedI in bitrise my triger to âdeployâ and did push to bitbucket, and bitrise started building project, but I got 2 errors with (cache-pull@1.0.0, gradle-runner@1.7.0) exit code: 1 .
This âsrc.zipâ. screenshot
Thanks for the links, I watched them, but in them talk about local methods, but I have windows os and I do not know how it can help me.
Iâm trying to create apk file of my android app. I add new workflow and add to my workflow 2 steps (Script and Deploy to Bitrise.io)
I use this script:
#!/bin/bash
set -e
set -x
mkdir -p ./keystore
echo y | keytool -genkeypair -dname "cn=Test, ou= Test, o= Test, c= Test " \
-alias TestTest -keypass TestTest -keystore ./keystore/android.keystore \
-storepass TestTest -validity 25
I build project, downloaded src.zip (screenshot) from bitrise when project build success and got android.keystore, I put android.keystore to root of my project and add this code to my gradle.
I changedI in bitrise my triger to âdeployâ and did push to bitbucket, and bitrise started building project, but I got 2 errors with (cache-pull@1.0.0, gradle-runner@1.7.0) exit code: 1 .
Based on the Log this seems to be an error in your project, or maybe a Java version difference
E.g.:
Note: the configuration refers to the unknown class 'Object'
Maybe you meant the fully qualified name 'java.lang.Object'?
You can still follow this guide How to debug your build locally / "It works on my Mac/PC but not on bitrise.io" and e.g. do a clean git clone and see if you can build the project from there; as well as if you install docker (Docker for Windows) you can also run the build through Docker as described in the Download and use the Android/Linux environment section.
Warning: there were 66 unresolved references to classes or interfaces.
You may need to add missing library jars or update their versions.
If your code works fine without the missing classes, you can suppress
the warnings with â-dontwarnâ options.
(ProGuard Manual: Troubleshooting | Guardsquare)
Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
You need to add appropriate keep options, correct dependencies or ignore those warnings.
Here are those 66 warnings:
Warning: com.vungle.publisher.sj: canât find superclass or interface com.google.android.gms.common.GooglePlayServicesClient$ConnectionCallbacks
Warning: com.vungle.publisher.sj: canât find superclass or interface com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Call
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.ResponseBody
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.ResponseBody
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.ResponseBody
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Cache
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Call
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.ResponseBody
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.OkHttpClient
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.CacheControl
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Request$Builder
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Response
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.ResponseBody
Warning: com.squareup.picasso.OkHttpDownloader: canât find referenced class com.squareup.okhttp.Cache
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.common.GooglePlayServicesClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.common.GooglePlayServicesClient$ConnectionCallbacks
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.location.LocationClient
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.common.GooglePlayServicesClient$ConnectionCallbacks
Warning: com.vungle.publisher.sj: canât find referenced class com.google.android.gms.common.GooglePlayServicesClient$OnConnectionFailedListener