Closed SergeyMell closed 3 years ago
Hi @SergeyMell could you share the project on GitHub? We could take a peek to see if anything is misconfigured.
Did you “npm run build:mobile” before doing the cap sync?
Hi @NathanWalker. Thank you for such a quick response.
Sure, I did npm run build:mobile
before. Also, I've added "@capacitor/android": "next"
to package.json
but this didn't help either.
Here you can find a demo repo: https://github.com/SergeyMell/capacitor-plugins/tree/android-platform (android-platform branch)
I was working on rate-my-app
plugin from the list of proposals so it would be great if we figure out whats the issue so I could continue ))
Thanks for sample, I’ll try to take a peek tomorrow evening.
@SergeyMell I see. I'm sorry I didn't add Android.
You need to run npm i @nativescript/capacitor
after npx cap add android
. This is that post install script run and overwrite android setting file( like https://github.com/nativescript-community/capacitor-plugins/commit/8204674422ddcbe8ac58af512a02f42b7d2f0097 )
I updated this repository to add android platform. Please check this.
I looks forward to add rate-my-app
. Thanks
Thanks a ton. It's much better for now. However, when I try to run android build I get an error
Script '/Users/mell/_contribute/capacitor-plugins/demo/angular/android/nativescript.build.gradle' line: 467
Execution failed for task ':app:cleanupAllJars'.
Could not get unknown property 'org' for task ':app:cleanupAllJars' of type org.gradle.api.DefaultTask.
But, if I comment out this line of code, the project runs successfully and works as expected
Mumu. I didn't get error. My Android studio version is 4.1.1. If you can't remove error after update Android Studio, or clean build, I want you will send issue to @nativescript/capacitor. Thanks.
Most likely @SergeyMell after you pulled @rdlabo 's latest changes you should probably do a full clean in Android Studio to ensure gradle was properly reset.
Yeah, my bad... After cleaning the project all started working like a charm.
I've added android platform to the demo project with the commands
according to the documentation
The project runs successfully, however, none of the actions (like change brightness or open native dialog work.
If I attach Android Studio t the process I get next logs after button click
So, it seems to be no error but nothing happens