Not able to build the app

This issue happens all the time
build for Android platform

spawn ssh-add /root/.ssh/bitrise_step_activate_ssh_key
Identity added: /root/.ssh/bitrise_step_activate_ssh_key (/root/.ssh/bitrise_step_activate_ssh_key)
# Success
The SSH key was saved to */root/.ssh/bitrise_step_activate_ssh_key*
and was successfully added to ssh-agent.
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | activate-ssh-key@3.1.1                                        | 4.98 sec |
+---+---------------------------------------------------------------+----------+
                                          ▼
+------------------------------------------------------------------------------+

| (1) git-clone@4.0.5                                                          |
+------------------------------------------------------------------------------+
| id: git-clone                                                                |
| version: 4.0.5                                                               |
| collection:                |
| toolkit: go                                                                  |
| time: 2018-01-24T13:58:46Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:58:46] Start installing (golang) with apt-get       
INFO[13:58:46]  * [OK] Step dependency (go) installed, available. 
Git Clone config:
- CloneIntoDir: /bitrise/src
- RepositoryURL: git@bitbucket.org:YMDEVELOPMENT/mms-android-sociallink.git
- UpdateSubmodules: true
Git Checkout config:
- Commit: 18baa9b0b46f43a9c13ee7f29e62ab06eba31e2c
- Tag: 
- Branch: feature/clone_profile_enhancement
- CloneDepth: 0
Git Pull Request config:
- PRRepositoryCloneURL: 
- PRID: 0
- BranchDest: 
- PRMergeBranch: 
- ResetRepository: false
- ManualMerge: true
Bitrise Build config:
- BuildURL:
- BuildAPIToken: 31ZJuJSeAmZMunPX5AW6Og
git "init"
Initialized empty Git repository in /bitrise/src/.git/
git "remote" "add" "origin" "git@bitbucket.org:YMDEVELOPMENT/mms-android-sociallink.git"
git "fetch"
Warning: Permanently added 'bitbucket.org,104.192.143.2' (RSA) to the list of known hosts.
From bitbucket.org:YMDEVELOPMENT/mms-android-sociallink
 * [new branch]      UAT        -> origin/UAT
 * [new branch]      dev        -> origin/dev
 * [new branch]      dev_enterprise -> origin/dev_enterprise
 * [new branch]      dev_temp_enterprise_test -> origin/dev_temp_enterprise_test
 * [new branch]      dev_v1.1   -> origin/dev_v1.1
 * [new branch]      dev_v1.6   -> origin/dev_v1.6
 * [new branch]      dev_v1.7   -> origin/dev_v1.7
 * [new branch]      dev_v2.0   -> origin/dev_v2.0
 * [new branch]      feature/clone_profile_enhancement -> origin/feature/clone_profile_enhancement
 * [new branch]      feed       -> origin/feed
 * [new branch]      master     -> origin/master
 * [new branch]      old_master_bkup -> origin/old_master_bkup
 * [new branch]      profile_enhancements -> origin/profile_enhancements
 * [new branch]      temp_gradle_v3_upgrade -> origin/temp_gradle_v3_upgrade
 * [new branch]      temp_test  -> origin/temp_test
 * [new branch]      v2.0.1     -> origin/v2.0.1
git "checkout" "18baa9b0b46f43a9c13ee7f29e62ab06eba31e2c"
Note: checking out '18baa9b0b46f43a9c13ee7f29e62ab06eba31e2c'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
HEAD is now at 18baa9b... for testing CI/CD
git "submodule" "update" "--init" "--recursive"
Exporting git logs
=> GIT_CLONE_COMMIT_MESSAGE_SUBJECT
   value: for testing CI/CD
=> GIT_CLONE_COMMIT_MESSAGE_BODY
   value: 
=> GIT_CLONE_COMMIT_AUTHOR_NAME
   value: Anand Agrawal
=> GIT_CLONE_COMMIT_AUTHOR_EMAIL
   value: Anand.Agrawal@communitybrands.com
=> GIT_CLONE_COMMIT_COMMITER_NAME
   value: Anand Agrawal
=> GIT_CLONE_COMMIT_COMMITER_EMAIL
   value: Anand.Agrawal@communitybrands.com
=> GIT_CLONE_COMMIT_HASH
   value: 18baa9b0b46f43a9c13ee7f29e62ab06eba31e2c
=> GIT_CLONE_COMMIT_COUNT
   value: 682
Success
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | git-clone@4.0.5                                               | 32 sec   |
+---+---------------------------------------------------------------+----------+
                                          ▼
+------------------------------------------------------------------------------+

| (2) cache-pull@2.0.1                                                         |
+------------------------------------------------------------------------------+
| id: cache-pull                                                               |
| version: 2.0.1                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-01-24T13:59:18Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
INFO[13:59:18] Start installing (rsync) with apt-get        
INFO[13:59:18]  * [OK] Step dependency (rsync) installed, available. 
INFO[13:59:18] Start installing (tar) with apt-get          
INFO[13:59:18]  * [OK] Step dependency (tar) installed, available. 
2018/01/24 13:59:20 Cache pull...
2018/01/24 13:59:21 Failed to get download url, error: Build cache not found. Probably cache not initialised yet (first cache push initialises the cache), nothing to worry about ;)
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ! | cache-pull@2.0.1 (exit code: 1)                               | 3.69 sec |
+---+---------------------------------------------------------------+----------+
|              |
+---+---------------------------------------------------------------+----------+
                                          ▼
WARN[13:59:21] Step (cache-pull@2.0.1) failed, but was marked as skippable 
+------------------------------------------------------------------------------+

| (3) Do anything with Script step                                             |
+------------------------------------------------------------------------------+
| id: script                                                                   |
| version: 1.1.5                                                               |
|                 |
| toolkit: bash                                                                |
| time: 2018-01-24T13:59:22Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Hello World!
+ echo 'Hello World!'
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | Do anything with Script step                                  | 1.37 sec |
+---+---------------------------------------------------------------+----------+
                                          ▼
INFO[13:59:23] Start installing (golang) with apt-get       
INFO[13:59:23]  * [OK] Step dependency (go) installed, available. 
+------------------------------------------------------------------------------+

| (4) install-missing-android-tools@2.0.6                                      |
+------------------------------------------------------------------------------+
| id: install-missing-android-tools                                            |
| version: 2.0.6                                                               |
| col       |
| toolkit: go                                                                  |
| time: 2018-01-24T13:59:23Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Configs:
- RootBuildGradleFile: build.gradle
- GradlewPath: ./gradlew
- AndroidHome: /opt/android-sdk-linux
Preparation
Set executable permission for gradlew
Initialize Android SDK
Ensure android licences
Ensure required Android SDK components
Searching for missing SDK components using:
$ ./gradlew "dependencies"
Failed to find missing components, retrying...
Searching for missing SDK components using:
$ ./gradlew "dependencies"
Failed to find missing components, retrying...
Searching for missing SDK components using:
$ ./gradlew "dependencies"
FAILURE: Build failed with an exception.
* Where:
Build file '/bitrise/src/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get mor
BUILD FAILED in 1s
exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | install-missing-android-tools@2.0.6 (exit code: 1)            | 62 sec   |
+---+---------------------------------------------------------------+----------+
| Update available: 2.0.6 -> 2.1.0                                             |
|
+---+---------------------------------------------------------------+----------+
                                          ▼
+------------------------------------------------------------------------------+

| (5) gradle-runner@1.8.0                                                      |
+------------------------------------------------------------------------------+
| id: gradle-runner                                                            |
| version: 1.8.0                                                               |
|               |
| toolkit: go                                                                  |
| time: 2018-01-24T14:00:25Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | gradle-runner@1.8.0                                           | 1.00 sec |
+---+---------------------------------------------------------------+----------+
                                          ▼
WARN[14:00:25] A previous step failed, and this step (gradle-runner@1.8.0) was not marked as IsAlwaysRun, skipped 
+------------------------------------------------------------------------------+

| (6) deploy-to-bitrise-io@1.3.10                                              |
+------------------------------------------------------------------------------+
| id: deploy-to-bitrise-io                                                     |
| version: 1.3.10                                                              |
         |
| toolkit: go                                                                  |
| time: 2018-01-24T14:00:26Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Configs:
-
- APIToken: 31ZJuJSeAmZMunPX5AW6Og
- IsCompress: false
- DeployPath: /bitrise/deploy
- NotifyUserGroups: everyone
- NotifyEmailList: 
- IsPublicPageEnabled: true
Deploying the content of the Deploy directory separately
List of files to deploy
Deploying files
Success
You can find the Artifact on Bitrise, on the Build's page: ht
|                                                                              |
+---+---------------------------------------------------------------+----------+
| ✓ | deploy-to-bitrise-io@1.3.10                                   | 3.96 sec |
+---+---------------------------------------------------------------+----------+
                                          ▼
+------------------------------------------------------------------------------+

| (7) cache-push@2.0.3                                                         |
+------------------------------------------------------------------------------+
| id: cache-push                                                               |
| version: 2.0.3                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: go                                                                  |
| time: 2018-01-24T14:00:30Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
|                                                                              |
+---+---------------------------------------------------------------+----------+
| - | cache-push@2.0.3                                              | 1.03 sec |
+---+---------------------------------------------------------------+----------+
+------------------------------------------------------------------------------+
|                               bitrise summary                                |
+---+---------------------------------------------------------------+----------+
|   | title                                                         | time (s) |
+---+---------------------------------------------------------------+----------+
| ✓ | activate-ssh-key@3.1.1                                        | 4.98 sec |
+---+---------------------------------------------------------------+----------+
| ✓ | git-clone@4.0.5                                               | 32 sec   |
WARN[14:00:30] A previous step failed, and this step (cache-push@2.0.3) was not marked as IsAlwaysRun, skipped 
+---+---------------------------------------------------------------+----------+
| ! | cache-pull@2.0.1 (exit code: 1)                               | 3.69 sec |
+---+---------------------------------------------------------------+----------+
           |
+---+---------------------------------------------------------------+----------+
| ✓ | Do anything with Script step                                  | 1.37 sec |
+---+---------------------------------------------------------------+----------+
| x | install-missing-android-tools@2.0.6 (exit code: 1)            | 62 sec   |
+---+---------------------------------------------------------------+----------+
| Update available: 2.0.6 -> 2.1.0                                             |
| Issue tracker: ...bitrise-steplib/steps-install-missing-android-tools/issues |
| Source: ...://github.com/bitrise-steplib/steps-install-missing-android-tools |
+---+---------------------------------------------------------------+----------+
| - | gradle-runner@1.8.0                                           | 1.00 sec |
+---+---------------------------------------------------------------+----------+
| ✓ | deploy-to-bitrise-io@1.3.10                                   | 3.96 sec |
+---+---------------------------------------------------------------+----------+
| - | cache-push@2.0.3                                              | 1.03 sec |
+---+---------------------------------------------------------------+----------+
| Total runtime: 110 sec                                                       |
+------------------------------------------------------------------------------+
Submitting anonymized usage informations...
For more information visit:
1 Like

Hi @anand_agrawal_aptify ! :wave: :slight_smile:

This error is usually caused by the Java version (see e.g. Unsupported major.minor version 52.0 2.5.0 · Issue #74 · evant/gradle-retrolambda · GitHub ).

Which stack did you run your build on?

Hi @viktorbenei
I am facing below issue every time can you please help.

Failed to get cache download url: build cache not found: probably cache not initialised yet (first cache push initialises the cache), nothing to worry about :wink:

Hi @ankit.kumar1,

This is regular for PR builds and if you build a branch that you haven’t pushed cache on before, since caches are stored per branch. You can find out more here: https://devcenter.bitrise.io/builds/caching/about-caching-index/

Hi @bitce Thanks for quick reply.

But i have checked and not able to delete our previous caches.

INFO[05:18:16] Start installing (tar) with apt-get
INFO[05:18:16] * [OK] Step dependency (tar) installed, available.
Config:

  • CacheAPIURL: [REDACTED]
  • DebugMode: false
  • StackID:
    Downloading remote cache archive
    Failed to get cache download url: build cache not found: probably cache not initialised yet (first cache push initialises the cache), nothing to worry about :wink:
    WARN[05:18:17] Step (cache-pull@2.1.0) failed, but was marked as skippable
    | |
    ±–±--------------------------------------------------------------±---------+
    | ! | cache-pull@2.1.0 (exit code: 1) | 2.31 sec |
    ±–±--------------------------------------------------------------±---------+
    | Issue tracker: Issues · bitrise-steplib/steps-cache-pull · GitHub |
    | Source: GitHub - bitrise-steplib/steps-cache-pull: Download Cache |
    ±–±--------------------------------------------------------------±---------+

Clearing NDK environment
Unset ANDROID_NDK_HOME
Initialize Android SDK
Ensure android licences
Ensure required Android SDK components
Retrying…
Failed to ensure android components, error: output: Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
error: exit status 1
| |
±–±--------------------------------------------------------------±---------+
| x | install-missing-android-tools@2.3.7 (exit code: 1)

These issue i am facing

Could you send us the build URL instead please? That would allow us to check out the logs :slight_smile:

Thanks! So the problem is in the install-missing-android-tools step and it seems to fail with: Could not find or load main class org.gradle.wrapper.GradleWrapperMain - which implies that you might be missing a vital file from your gradle folder in the repository, most likely the gradle-wrapper.properties

@bitce yes i have not commit gradle-wrapper.properties. So i need to commit this file first ??

That’s correct :slight_smile:

@bitce
I have update gradle-wrapper.properties on git but same issue is coming.Please verify again my log file.

Doesn’t seem like the same issue, it appears that you have removed the step input $GRADLEW_PATH which is a default variable. You have to provide path to the gradle wrapper file relative to the repository root. For example, if it’s at the root: ./gradlew

Hii @bitce
Can you let me please how I setup $GRADLEW_PATH .

@bitce
Please guide me how I fix below issue
Downloading remote cache archive

Failed to get cache download url: build cache not found: probably cache not initialised yet (first cache push initialises the cache), nothing to worry about :wink:

WARN[16:24:15] Step (cache-pull@2.1.0) failed, but was marked as skippable

1 Like

@ankit.kumar1, would you consider contacting us on the on-site chat instead? There is a speech bubble thumbnail in the bottom right corner of the site, this conversation might be better suited there :slight_smile:

I am facing this issue how it will be resolve??

Execution failed for task ‘:app:compileElamDebugKotlin’.

Hi @ankit.kumar1

Could you please share the related build URL and make sure that you have Support Access enabled for it? :slight_smile:
We’ll take a look!
Please also consider reaching us on our on-site chat as communications would be more effective, and could even go into issues other than the current topic :wink:

Hi @Roland-Bak
Can you help me, I need to change server url through the bitrise for android.
what is the process of change server URL through the bitrise and then it should deploying on google play store alpha/beta chanal .

Thanks

Hi @Roland-Bak @viktorbenei

I want to change our deployment back end api server url
(for example)
My base server url= https://abc-stage1.test.com/gl/v2/
i want to change this through bitrise

can you guide me how can i change this from bitrise