Search code examples
react-nativevisual-studio-app-centerappcenter

Appcenter build successful but can't find APK file - React Native


We are facing issues with React-Native in AppCenter. We are Once I run the build, everything goes well but at end we are facing below issue.

No addition pre or post script added in AppCenter.

Execution optimizations have been disabled for 12 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

**BUILD SUCCESSFUL** in 11m 32s
362 actionable tasks: 351 executed, 11 up-to-date
##[section]Finishing: Gradle Task
##[section]Starting: Android Postprocess
==============================================================================
Task         : Shell script
Description  : Run a shell script using Bash
Version      : 2.212.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/shell-script
==============================================================================
[command]/bin/bash /Users/runner/runners/2.214.1/scripts/android-postprocess.sh /Users/runner/work/1/s/android/app/build/outputs/apk
Removing all ABI or density dependent APKs…
Found        0 APK file(s)
Found        0 unaligned APK file(s)
~/work/1/s/android/app/build/outputs ~/runners/2.214.1/scripts
~/runners/2.214.1/scripts
##[section]Async Command Start: Add Build Tag
Build '16' has following tags now: normal, android-app-bundle, javascript, android, manual, signed, mapping, distribution
##[section]Async Command End: Add Build Tag
##[section]Finishing: Android Postprocess
##[section]Starting: Sign APK
==============================================================================
Task         : Android signing
Description  : Sign and align Android APK files
Version      : 3.201.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/android-signing
==============================================================================
##****[error]Error: No matching files were found with search pattern: ****/Users/runner/work/1/s/android/app/build/**/*.apk
##[section]Finishing: Sign APK
##[section]Starting: Sign APK
==============================================================================
Task         : Android signing
Description  : Sign and align Android APK files
Version      : 3.201.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/android-signing
==============================================================================
##[section]Finishing: Sign APK
##[section]Starting: Checkout XXXXXXX@development to s
==============================================================================
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: XXXXXXX (ExternalGit)
##[section]Finishing: Checkout XXXXXXX@development to s
##[section]Starting: Finalize Job
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (23181) (java)
Terminate orphan process: pid (22867) (java)
Terminate orphan process: pid (11113) (java)
Terminate orphan process: pid (7987) (java)
##[section]Finishing: Finalize Job
##[section]Finishing: Build

I tried with all the options but unable to resolve the issues.


Solution

  • I got the answer of my own question. As per Appcenter document you need to set universalApk to true. This is the only way in Appcenter weather you plan to make multiple apk to reduce the size.

    The solution is to make universalApk to true.