Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 5 capacitor android project not sync

Android studio keeps building and install the first android project into the device.

I have tried

npx cap sync

npx cap copy android

Even delete the /android folder and add it again. The project still remains as the first time I added into the android studio. I have tried 'Gradle sync' and 'Invalidate cache /restart' still no luck.

I have update my project resource icon and splash to a customized one, but the android project still using the capacitor default icon and splash. Have anyone face this issue before?

like image 912
Thomas Kim Avatar asked Nov 01 '25 03:11

Thomas Kim


1 Answers

I found the solution!

I notice the npx sync is copying data from the www folder. Thus, I think I need to update the www folder first before sync. Thus I use the

ionic build

Command, to build all the files into www and run

npx cap sync 
npx cap open android

Tada, android project is updated.

like image 149
Thomas Kim Avatar answered Nov 04 '25 08:11

Thomas Kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!