Capacitor Build - Errors With capacitor-cordova-android-plugins?
-
I have been having issues building my app to test with capacitor. The following command works: quasar build -m cordova -T android --debug, and I am able to then plop this apk onto my device and the application works as intended. If I instead run quasar build -m capacitor -T android --debug, the output apk does not open on my device, it simply hits a white screen.
I tried then opening up the build in android studio and am seeing errors with capacitor-cordova-android-plugins. Is anyone else seeing similar? Is there something I am missing?
When I run the capacitor dev server I always get an error:
10:04 PM Unsupported Modules Detected: Compilation is not supported for following modules: capacitor-cordova-android-plugins. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.
This requires me to invalidate the cache and restart. When I do this, I am then able to run the app on an emulator. However I still cannot get the apk to work on an actual device.
-
I have very little experience with Capacitor or Cordova, but not all Cordova plug-ins are compatible with Capacitor. They don’t make that claim. So, you might be stuck with Cordova.
Scott
-
@jpperlm said in Capacitor Build - Errors With capacitor-cordova-android-plugins?:
I have been having issues building my app to test with capacitor. The following command works: quasar build -m cordova -T android --debug, and I am able to then plop this apk onto my device and the application works as intended. If I instead run quasar build -m capacitor -T android --debug, the output apk does not open on my device, it simply hits a white screen.
I tried then opening up the build in android studio and am seeing errors with capacitor-cordova-android-plugins. Is anyone else seeing similar? Is there something I am missing?
When I run the capacitor dev server I always get an error:
10:04 PM Unsupported Modules Detected: Compilation is not supported for following modules: capacitor-cordova-android-plugins. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.
This requires me to invalidate the cache and restart. When I do this, I am then able to run the app on an emulator. However I still cannot get the apk to work on an actual device.
Invalidate cache https://quasar.dev/quasar-cli/developing-capacitor-apps/troubleshooting-and-tips#Android-Studio
-
Thanks @metalsadman
Scott
-
Hello,
I had the same message while migrating to capacitor from cordova.
I removed all my cordova plugins, but I still got that error.
The way I fixed the error (I have not idea why it is related to capacitor-cordova-android-plugins message), was that I was using my own certificate.
I changed from
devServer: {
https: {
key: fs.readFileSync(’/path/to/server.key’),
cert: fs.readFileSync(’/path/to/server.crt’),
ca: fs.readFileSync(’/path/to/ca.pem’),
}
to
devServer: {
https: false,