Appcenter: Upgraded to RN 59 now failing to find APKs

Created on 31 May 2019  Â·  20Comments  Â·  Source: microsoft/appcenter

Some how it's adding an additional /app/app, any ideas how to find where/why this occurring?

You can see here at the start there's no additional /app/app

##[section]Finishing: Install Android keystore
##[section]Starting: Gradle Task
==============================================================================
Task         : Gradle
Description  : Build using a Gradle wrapper script
Version      : 1.128.0
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613720)
==============================================================================
SYSTEMVSSCONNECTION exists true
[command]/Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/gradlew 

Additional /app/app

==============================================================================
Task         : Shell Script
Description  : Run a shell script using bash
Version      : 2.1.3
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613738)
==============================================================================
[command]/bin/bash /Users/vsts/agent/2.150.3/scripts/android-postprocess.sh /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/outputs/apk
Removing all ABI or density dependent APKs…
find: /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/outputs/apk: No such file or directory
find: /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/outputs/apk: No such file or directory
find: /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/outputs/apk: No such file or directory
Found        0 APK file(s)
Found        0 unaligned APK file(s)
find: /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/outputs/apk: No such file or directory
##[section]Finishing: Android Postprocess
##[section]Starting: Sign APK
==============================================================================
Task         : Android Signing
Description  : Sign and align Android APK files
Version      : 1.122.0
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613717)
==============================================================================
##[error]No matching files were found with search pattern: /Users/vsts/agent/2.150.3/work/1/s/mobile/android/app/app/build/**/*.apk
##[error]Return code: 1
##[section]Finishing: Sign APK
##[section]Starting: Checkout
bug

Most helpful comment

I removed all files on android/app folder related to gradle

android/app/gradlew
android/app/gradlew.bat
android/app/gradle/wrapper/grade-wrapper.properties
android/app/gradle/wrapper/grade-wrapper.jar

and it works perfectly

All 20 comments

Thanks for reporting this @M1K3Yio . Running some initial investigation. Might be easier to conduct deeper investigation if you reach out to support (chat bubble at bottom right of App Center portal)

We can leave this open as this could something common.

Thanks, I reached out to support via chat bubble. I was on the right track for the issue, where I believe Android Studio assisted that it needed to add /gradle/wrapper, gradlew, and gradlew.bat under the app folder, which already existed in /android folder. Also, I had to force indexing on the build which was a suggestion by them as I tried many different combinations.

In the end removing those duplicates created under /app fixed our problem.

Hi @M1K3Yio, I'm running into the same issue. Can you explain the fix in more detail please.

Nevermind, figured it out. Deleting these duplicates also solved our problem:

  • /app/gradle/*
  • /app/gradlew
  • /app/gradlew.bat

I have the same issue and I dont have these files on app folder.

just upgraded to RN 60 and had this problem with the /app/app/build folder. Can't figure out how to get rid of second app folder that doesn't exist

@zek @bova80 do you mind reaching out to support (via chat bubble on the App Center portal) for this?

will do

turns out delete the duplicate gradle stuff in the app dir resolved the issue. It wasn't working for me cause I didn't realize I had to go back into build configuration and re-save it to reset settings. works now though.

Awesome! Thanks for sharing! Feel free to submit a different feature request to not require a re-save for such changes to take effect 😄

@DennisPan I did but no answers for 2 weeks :/

@zek I found the conversation in support. Looks like we waited for your response 11 days ago, and closed it due to inactivity. I will re-open it and then we can follow up

@zek I've responded to you on the support conversation, but haven't received a response. Whenever you are ready, please reach out there then we will take a look.

Hello. I have the same issue , have the latest RN version. Can not build an app at all.

[command]/bin/bash /Users/vsts/agent/2.158.0/scripts/android-postprocess.sh /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk
Removing all ABI or density dependent APKs…
find: /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk: No such file or directory
find: /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk: No such file or directory
find: /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk: No such file or directory
Found 0 APK file(s)
Found 0 unaligned APK file(s)
find: /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk: No such file or directory
/Users/vsts/agent/2.158.0/scripts/android-postprocess.sh: line 36: pushd: /Users/vsts/agent/2.158.0/work/1/s/android/app/build/outputs/apk/..: No such file or directory
/Users/vsts/agent/2.158.0/scripts/android-postprocess.sh: line 43: popd: directory stack empty

[error]/bin/bash failed with return code: 1

[error]Bash failed with error: /bin/bash failed with return code: 1

[section]Finishing: Android Postprocess

[section]Starting: Post Build Script

Wrote to chat support too. Any advice on how to fix this? I look into the app folder and do not have duplicate files.

I removed all files on android/app folder related to gradle

android/app/gradlew
android/app/gradlew.bat
android/app/gradle/wrapper/grade-wrapper.properties
android/app/gradle/wrapper/grade-wrapper.jar

and it works perfectly

I haved the same problem, and remove de duplicate config gradle does not worked. So I disabled the config for build multiple APKS in my android.app/build.gradle.
setenableSeparateBuildPerCPUArchitecture = false worked for me.

I haved the same problem, and remove de duplicate config gradle does not worked. So I disabled the config for build multiple APKS in my android.app/build.gradle.
setenableSeparateBuildPerCPUArchitecture = false worked for me.

Unfortunately, we need enableSeparateBuildPerCPUArchitecture = true to reduce our file size and don't want to upgrade to AAB's yet. Not sure why it can't find the outputs...

I removed all files on android/app folder related to gradle

android/app/gradlew
android/app/gradlew.bat
android/app/gradle/wrapper/grade-wrapper.properties
android/app/gradle/wrapper/grade-wrapper.jar

and it works perfectly

Same problem and i try this and it's work
but note i also try
1.Edit config save & build not build now
2.Try reselect node version then save & build

I removed all files on android/app folder related to gradle

android/app/gradlew
android/app/gradlew.bat
android/app/gradle/wrapper/grade-wrapper.properties
android/app/gradle/wrapper/grade-wrapper.jar

and it works perfectly

Same problem and i try this and it's work
but note i also try
1.Edit config save & build not build now
2.Try reselect node version then save & build

When I do this, I get this error:

==============================================================================
Task         : Gradle
Description  : Build using a Gradle wrapper script
Version      : 1.128.0
Author       : Microsoft Corporation
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkID=613720)
==============================================================================
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
(node:2373) Warning: Use Cipheriv for counter mode of aes-256-ctr
##[error]Error: Not found wrapperScript: /Users/runner/runners/2.165.2/work/1/s/mobile/android/app/gradlew
##[section]Finishing: Gradle Task
##[section]Starting: Post Build Script

@dusanjovanov did you try
1.Save&Build ,
2.Try reselect node version then save & build

Was this page helpful?
0 / 5 - 0 ratings