ionic-team / trapeze

The mobile project configuration toolbox. Manage native iOS, Android, Ionic/Capacitor, React Native, and Flutter apps through a simple YAML format.
https://trapeze.dev
Other
328 stars 40 forks source link

Bug: Incompatible with latest Capacitor V5 Android Platform #185

Closed tobiasmuecksch closed 1 year ago

tobiasmuecksch commented 1 year ago

Description

As of Capacitor v5 the Android project structure seems to have changed. The MainActivity.java file is not located where it formerly was.

Trapeze expects the file under this path: android/app/src/main/java/MainActivity.java

But now it's located under android/app/src/main/java/io/ionic/starter/MainActivity.java.

Therefore, running npx @trapezedev/configure run platform-config.yml results in the following error:

image

Versions

Reproduction

For reproduction purposes I've created a pristine demo repository with a blank ionic app and only an android platform.

  1. Clone Repo: https://github.com/tobiasmuecksch/cap5-trapeze-bug
  2. Install dependencies npm i
  3. run npx @trapezedev/configure run platform-config.yml
  4. See the error
martinbertinat commented 1 year ago

Same problem here.

Did you found a workaround?

Thanks

tobiasmuecksch commented 1 year ago

@martinbertinat No. I haven't.

mlynch commented 1 year ago

Thanks will look into this. Regardless it shouldn't assume and should either support it being specified or read it from the manifest (ideally)

mlynch commented 1 year ago

Fixed in 7.0.9

tobiasmuecksch commented 1 year ago

@mlynch Thank you so much, for the quick fix. I've tested it, and it works like a charm!

tobiasmuecksch commented 1 year ago

@mlynch I'm afraid I have to revoke what I said. It doesn't work as expected. After running trapeze, Android Studio cannot start the app in the emulator anymore.

Since I cannot reopen this issue, I have opened a new one here: https://github.com/ionic-team/trapeze/issues/188