ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.21k stars 1k forks source link

[Bug]: Android build not including capacitor plugins #7660

Closed kylejoeckel closed 1 month ago

kylejoeckel commented 2 months ago

Capacitor Version

[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted. 💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2

Installed Dependencies:

@capacitor/cli: 6.1.2 @capacitor/core: 6.1.2 @capacitor/android: 6.1.2 @capacitor/ios: 6.1.2

[success] iOS looking great! 👌 [success] Android looking great! 👌

Other API Details

Kyles-MBP-2:micard-next-capacitor kylejoeckel$ pnpm -v
9.1.1
Kyles-MBP-2:micard-next-capacitor kylejoeckel$ node -v
v22.5.1
"next": "14.1.0"

Platforms Affected

Current Behavior

The app successfully builds and i am able to navigate around a few of the account creation and sign up pages however when i try to log in or create an account ( the first use case for a capacitor plugin ie Preferences ) i recieve an error "Preferences is not implemented on android". Similarly, i get the same error with any other capacitor such as browser or camera. I've run the normal commands for this process such as sync and copy. I should note that the iOS version works as expected with no issue.

Expected Behavior

Obviously these packages should be converting and working as expected in the android build.

Project Reproduction

https://github.com/miware-org/micard-next-capacitor/tree/android

Additional Information

No response

ionitron-bot[bot] commented 2 months ago

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed. Please see the Contributing Guide for how to create a Sample App. Thanks! Ionitron 💙

curlyz commented 1 month ago

Probably due to NPM packages is installed with Bun or PNPM. Since these use symlink, not a real files in node_modules. And pod install turned out need a real files.

TheBoneJarmer commented 1 month ago

Hi, I just hit a similar issue and I realized that the folder capacitor-cordova-android-plugins and the file local.properties are being ignored by git. I had to remove the android folder and re-run npx cap add android to realize this. I just checked and they are indeed present in the .gitignore file:

https://github.com/ionic-team/capacitor/blob/5bd85519833797efe13769c545abd1993987d1c9/android-template/.gitignore#L93

https://github.com/ionic-team/capacitor/blob/5bd85519833797efe13769c545abd1993987d1c9/android-template/.gitignore#L27

I don't know if it helps or is related at all but I feel like it is a bit too much of a confidence that your build is lacking the exact plugin folder that is on the gitignore list

jcesarmobile commented 1 month ago

Closing since the provided repository is not accessible

ionitron-bot[bot] commented 1 week ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.