Skip to content

Android can't build after upgrade gradle to 4.4 and tools.build:gradle to 3.1.0 #22196

Closed

Description

@WCChimiiz

Use https://github.com/react-native-community/discussions-and-proposals to propose changes or discuss feature requests. This helps us ensure bug reports and regressions are given the priority they require.

You may also use https://discuss.reactjs.org/ for discussions on topics that are not necessarily served by the Bug Report template.


For Discussion

I upgraded RN to 0.56 from 0.55.4, gradle to 4.4 from 3.5, build tools to 3.1.0 from 2.3.0

I run some thing to generate signed apk.
./gradlew clean assembleRelease

I got error.

BUILD SUCCESSFUL in 3m 24s
535 actionable tasks: 481 executed, 54 up-to-date
cp: android/app/build/outputs/apk/app-release.apk: No such file or directory
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

but when I run react-native run-android it fine. I can start app.

Activity

  1. added
    Platform: Android
    Type: Discussion
    on Nov 7, 2018
  2. radko93 commented on Nov 7, 2018

    @radko93
    Contributor
  3. WCChimiiz commented on Nov 8, 2018

    @WCChimiiz
    Author

    Check out this MR https://github.com/react-native-community/react-native-releases/pull/60/files

    I follow up form this link it not work for my case. It still error

    BUILD SUCCESSFUL in 3m 31s
    535 actionable tasks: 498 executed, 37 up-to-date
    cp: android/app/build/outputs/apk/app-release.apk: No such file or directory
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    
    
  4. radko93 commented on Nov 8, 2018

    @radko93
    Contributor

    I cannot help if you're not using latest version or publish some exact repro steps, sorry.

  5. added and removed
    Type: Discussion
    on Nov 8, 2018
  6. WCChimiiz commented on Nov 9, 2018

    @WCChimiiz
    Author

    I cannot help if you're not using latest version or publish some exact repro steps, sorry.

    Thank, now we try upgrade to 0.57.4

  7. WCChimiiz commented on Nov 14, 2018

    @WCChimiiz
    Author

    @radko93 how to fix this

    :react-native-maps:prepareReleaseDependencies
    Conflict with dependency 'com.android.support:support-v4' in project ':react-native-maps'. Resolved versions for compilation (26.1.0) and packaging (24.0.0) differ. This can generate runtime errors due to mismatched resources.
    :react-native-maps:prepareReleaseDependencies FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':react-native-maps:prepareReleaseDependencies'.
    > Dependency Error. See console for details.
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 40.629 secs
    Could not install the app on the device, read the error above for details.
    Make sure you have an Android emulator running or a device connected and have
    set up your Android development environment:
    https://facebook.github.io/react-native/docs/getting-started.html
    ✨  Done in 60.02s.
    

    now I try upgrade to 0.56 from 0.55.4 iOS it fine but can't run android

  8. radko93 commented on Nov 15, 2018

    @radko93
    Contributor

    Seems like react-native-maps have a different dependenc of com.android.support:support-v4. You should check react-native-maps gradle files and maybe ask there.

  9. locked as resolved and limited conversation to collaborators on Nov 7, 2019
  10. added
    Resolution: Locked
    on Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidResolution: Locked

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions