Reputation: 513
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?
Upvotes: 3
Views: 9721
Reputation: 33335
if you are using the ionic commands the all you have to do is call ionic capacitor sync
... it will do all of the building and the copying of assets
https://ionicframework.com/docs/cli/commands/capacitor-sync
Upvotes: 1
Reputation: 1247
Every time you perform a build (e.g. ionic build) that changes your web directory (default: www), you'll need to copy those changes down to your native projects:
reference : https://capacitor.ionicframework.com/docs/getting-started/with-ionic
Upvotes: 4
Reputation: 513
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.
Upvotes: 9