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

[Bug]: Migration to version 6 fails to update gradle wrapper files #7489

Closed
3 tasks done
HarelM opened this issue May 29, 2024 · 3 comments
Closed
3 tasks done

[Bug]: Migration to version 6 fails to update gradle wrapper files #7489

HarelM opened this issue May 29, 2024 · 3 comments
Labels
type: bug A confirmed bug report

Comments

@HarelM
Copy link

HarelM commented May 29, 2024

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0

Installed Dependencies:

@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0

[success] iOS looking great! 👌
[success] Android looking great! 👌

Other API Details

npm --version 10.2.3
node --version v20.10.0
pod --version 1.12.1

Platforms Affected

  • iOS
  • Android
  • Web

Current Behavior

npx cap migrate
[info] Please note this tool is not intended for use in a mono-repo environment, please check out the Ionic vscode
       extension for this functionality.
[?] Capacitor 6 sets a deployment target of iOS 13 and Android 14 (SDK 34).
    
✔ Are you sure you want to migrate? (Y/n) … y
[?] Would you like the migrator to run npm, yarn, pnpm, or bun install to install the latest versions of capacitor
    packages? (Those using other package managers should answer N)
✔ Run Dependency Install? (Y/n) … y
[?] What dependency manager do you use?
✔ Dependency Management Tool › NPM
✔ Installing Latest Modules using npm. in 55.11s
✔ Migrating Info.plist by removing NSLocationAlwaysUsageDescription key. in 887.63μs
✖ Upgrading gradle wrapper files - failed!
[error] gradle wrapper files were not updated
[info] Set com.android.tools.build:gradle = 8.2.1.
[info] Set com.google.gms:google-services = 4.4.0.
✔ Migrating build.gradle file. in 834.67μs
✔ Replacing deprecated compileSdkVersion from build.gradle in 224.13μs
✔ Migrating variables.gradle file. in 2.32ms
✔ Migrating package from Manifest to build.gradle in Capacitor plugins in 45.30ms
✔ Running cap sync. in 7.54s
[info] IMPORTANT: Review https://capacitorjs.com/docs/next/updating/6-0#plugins for breaking changes in these plugins
       that you use: @capacitor/camera.
✔ Writing breaking changes. in 251.25μs
[success] Migration to Capacitor ^6.0.0 is complete. Run and test your app!

Expected Behavior

No problems in the console - gradle wrapper should be updated.

Project Reproduction

https://github.com/IsraelHikingMap/Site/tree/737c325f4bc79c665e270aedcc3d454d6b9cb09f

Additional Information

I've added a link to the project - use the IsraelHiking.web where the client is residing.
I've added a link to a specific commit as I plan to continue the migration but hopefully allow you to improve the migration script for others, and provide some manual steps that needs to be taken on my part to solve this.

Thanks!

@HarelM HarelM added the triage label May 29, 2024
@jcesarmobile jcesarmobile added the type: bug A confirmed bug report label May 30, 2024
Copy link

ionitron-bot bot commented May 30, 2024

This issue has been labeled as type: bug. This label is added to issues that that have been reproduced and are being tracked in our internal issue tracker.

@NechiK
Copy link

NechiK commented Jun 6, 2024

I didn't update to version 6, but I had another case.

I created an Ionic project from scratch to test something but couldn't run it. After adding the Android console, it said that I needed to sync Gradle manually. However, when I opened Android Studio, it updated dependencies, but I still couldn't run the project with cap run android, because it still couldn't resolve dependendcies.

I've noticed that it mentions something about Java versions 8 and 11, but by default, the new Android Studio uses Java 17. And I just realized that on my Mac I'm using Java 8. So I installed Java 17 and switched it in the .bash_profile. After that, I could finally start the project.

I don't know it that will help, but maybe it will be useful for you.

Copy link

ionitron-bot bot commented Jul 10, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jul 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug report
Projects
None yet
Development

No branches or pull requests

3 participants