Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.59.8] Android release build fails #24987

Closed
perryhoekstra opened this issue May 21, 2019 · 11 comments
Closed

[0.59.8] Android release build fails #24987

perryhoekstra opened this issue May 21, 2019 · 11 comments
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.

Comments

@perryhoekstra
Copy link

React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
Memory: 1.74 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - /usr/local/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 24, 26, 27, 28
Build Tools: 23.0.1, 26.0.2, 27.0.3, 28.0.3
System Images: android-23 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.8 => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1
Gradle: com.android.tools.build:gradle:3.4.1

Steps To Reproduce

  1. Create new React-Native project: react-native init Acme
  2. Open Acme project within Android Studio
  3. Change Build Variant from debug to release

Describe what you expected to happen:

Android Studio would build an unsigned release *.apk file.

What actually happens:

Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Loading dependency graph, done.
error ENOENT: no such file or directory, open '/var/folders/pk/ghcf8fb90k7bpk_kkdgkcr28t9y1js/T/metro-cache/20/ff278d129e1cd5c490c10ed7b62f90b93800c13df7a07c6f26a9d561c05d9aaaad0412'. Run CLI with --verbose flag for more details.

Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:bundleReleaseJsAndAssets'.

Process 'command 'node'' finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 32s
1 actionable task: 1 executed
ERROR: Process 'command 'node'' finished with non-zero exit value 1

@react-native-bot react-native-bot added the Platform: Android Android applications. label May 21, 2019
@dulmandakh
Copy link
Contributor

you must use Android Gradle plugin 3.3.x with 0.59.x. 0.60 will support Android Gradle Plugin 3.4.x.

@perryhoekstra
Copy link
Author

perryhoekstra commented May 22, 2019

dulmandakh: I tried multiple versions of the Android Gradle plugin, including 3.3.1 and 3.3.0 with no success. So, I don't believe this issue should be closed.

@zhifeng-heng
Copy link

Hi all, i am facing the exact same issue.

Environment:

  • RN 0.59.8
  • Gradle 3.4.1
  • compileSdkVersion 28
  • buildToolsVersion '28.0.3'

Anyone have any solution so far?

@GospelHW
Copy link

same bug

@GospelHW
Copy link

React Native Environment Info:
System:
OS: macOS 10.14.4
CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
Memory: 81.60 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.6.0 - /usr/local/bin/node
npm: 6.7.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 22, 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.0, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom, android-25 | Google APIs ARM 64 v8a, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-Q | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.8 => 0.59.8
npmGlobalPackages:
create-react-native-app: 2.0.2
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7

@GospelHW
Copy link

@dulmandakh Hi how can i do? pls help me,thx

@nikopolidi
Copy link

nikopolidi commented Jun 5, 2019

@dulmandakh same issue:

> Task :app:bundleReleaseJsAndAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> A problem occurred starting process 'command 'android/app/build/generated/assets/react/release/index.android.bundle.map''

Gradle Scan output (absolute app path replaced with {APP_PATH})

A problem occurred starting process 'command '{APP_PATH}/android/app/build/generated/assets/react/release/index.android.bundle.map''
> Could not start '{APP_PATH}/android/app/build/generated/assets/react/release/index.android.bundle.map'
  > Cannot run program "{APP_PATH}/android/app/build/generated/assets/react/release/index.android.bundle.map" (in directory "{APP_PATH}"): error=2, No such file or directory
    > error=2, No such file or directory
  • RN 0.59.8
  • Gradle 3.3.1
  • compileSdkVersion 28
  • buildToolsVersion '28.0.3'

@daominhsangvn
Copy link

Why this closed? I got the same issue, here my environment:

React Native Environment Info:
    System:
      OS: macOS 10.14.5
      CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
      Memory: 2.62 GB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 9.11.2 - ~/.nvm/versions/node/v9.11.2/bin/node
      Yarn: 1.13.0 - ~/.nvm/versions/node/v9.11.2/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v9.11.2/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 27.0.1, 27.0.3, 28.0.0, 28.0.3
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.8 => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
    Project Gradle: 
      distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
      buildScript: com.android.tools.build:gradle:3.4.1
    

@nikopolidi
Copy link

I solved that issue by creating fresh app with ‘react-native init’ and configuring release build type.
Then I was installing latest version of every dependency that has to be linked, one by one with assembleRelease after each.
As result I figured that there are 2 dependencies using older android API level <24 when 28 is defined with rootProject.ext...
‘react-native-smart-splash-screen’
‘react-native-thumbnail’
Build was successful after unlinking and remove bing these modules

@ranjanrukhaya-gommt
Copy link

Facing this issue with release build but works abs fine in debug build.

Environment ::

  • React Native 0.59.8

  • React 16.8.3

  • Gradle 3.3.2

  • compileSdkVersion 28

Is it some proguard issue or gradle one ?

@ferostabio
Copy link

Since this issue is still closed, devs aren't answering and I'm still experiencing the issue even after attempting a number of version alternatives, including the just released 0.60.0, I created a new issue.

@facebook facebook locked as resolved and limited conversation to collaborators May 22, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: Android Android applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants