To implement the capacitor Firebase/Crashlytics in ionic project. where to implement this functionality in which component..
I have implemented Capacitor plugin for Firebase Crashlytics in my Ionic 6 app.. where to implement this functionality can you help me ...
to install the plugin:- npm i #capacitor-firebase/crashlytics
Related
I added capacitor via the quasar framework. I didn't add any plugin at first and everything worked perfectly. Then I updgraded to capacitor v3. I followed the guide and my app worked also without any problems. Then I added the geolocation plugin to capacitor. It works as expected in the browser, but when I try it on my native android device it gives me this error:
"Geolocation" plugin is not implemented on android
It looks like I didn't install the plugin, but as I said, it works in the browser.
Ok fixed it, by checking both package.json files (also the one in /src-capacitor). I used capacitor 3 in my web project but capacitor 2 in my capacitor project. I wanted to use v3 so I tried to access the plugin in the way of capacitor v3 which did not work.
This is because Capacitor changes the underlying Gradle files but Android Studio doesn't know.
To fix this, go to Android studio click File -> Sync Project with Gradle Files
How to run moodle mobile app on android studio? I want to add my own plugins as well.
I have followed moodle documentation https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2 but it stuck on Native build dependencies.
Code I am following: https://github.com/moodlehq/moodleapp
Also try to run this code on android studio ( follow:https://www.youtube.com/watch?v=IA3c2lpoOtU&t=757s ),I am having a blank white screen(I have paste moodle src folder on www folder and run the src/index.html)
Can somebody share video tutorial regarding this? It will be really helpful.
At first you need to add android platform to your project by these bash commands:
Removing and adding
npx ionic cordova platform remove android
npx ionic cordova platform remove ios
npx ionic cordova platform add android
npx ionic cordova platform add ios
Once you have added platforms, you can run setup using this command:
npm run setup
After successful setup you can open the the project in android studio:
android studio project location should be CORDOVA_PROJECT_DIRECTORY/platforms/android
Source:
https://docs.moodle.org/dev/Setting_up_your_development_environment_for_Moodle_Mobile_2
Okay, so you run this. And it continues to fail.
cordova platform add android --save
And the output is this.
Error: Failed to fetch platform cordova-android#0.0.8
After trying to reinstall cordova, node, and other packages, I have had no luck. I am running this with the ionic blank starter package with ionic Cli 3.
For some reason with the latest version of everything, ionic, angular, the cli, etc, the platform was trying to add
cordova-android#0.0.8
To fix this, just go to this link and get the latest version, and run this...
sudo ionic cordova platform add android#6.4.0
I had the same issue and followed this link
https://github.com/apache/cordova-android/releases
There, I found that the latest version is 7.1.1
I tried this ionic cordova platform add android#7.1.1 but got the same error
From a forum I follow, I got this link https://www.npmjs.com/package/cordova-android
Then I tried this ionic cordova platform add android#7.1.0 and it ran as I expected
remove old android
ionic cordova platform rm android
add latest android
ionic cordova platform add android#latest
I am starting to learn Ionic, and on building my first application, when typing the
# ionic platform add android
it says that the command has been renamed. My question is, what was it changed with?
In the tutorial I follow, it says to execute the commands
# ionic platform add android
# ionic build android
# ionic run android
On searching the web, I have come across the command
# ionic cordova run android
and it also said that cordova was moved to a CLI which also has to be installed.
But what about "add" and "build"? They are not required anymore?
Thank you.
I believe you are using latest Ionic version, 3.6.0 and above. Since then Ionic cli commands have renamed from
ionic platform add android to ionic cordova platform add android
For all the commands append cordova after ionic keyword.
For list of command, refer to the documentation here at https://ionicframework.com/docs/cli/
Your tutorial commands are outdated. But you can still follow them, but just append cordova after ionic keyword
ionic platform add android becomes ionic cordova platform add android
ionic build android becomes ionic cordova build android
ionic run android becomes ionic cordova run android
"But what about "add" and "build"? They are not required anymore?" - You still need them for adding platforms/plugins.
add is used for adding platforms/plugins. For ex: To add ios platform you use ionic cordova platform add ios
build is used for Build (prepare + compile) an Ionic project for a given platform. For ex: To build ios you need ionic cordova build ios
Note: you can replace ios with android or vise versa in any of the above commands.
Since you started learning check this website out, might be a good place to start - https://ionicacademy.com/
Now "ionic" is renamed with "ionic cordova".
So use:
ionic cordova platform add android
ionic cordova run android
***for run on windows****
ionic cordova platform add browser
ionic serve
I have installed the ionic framework cordova and I have used the command the below command for setting up crosswalk.
npm install ionic
ionic start my_app
cd my_app
ionic browser add crosswalk
ionic run android
When I ran the last command line
ionic run android
The project build is successful. But when it is launched on Android emulator, I got this error
"unfortunately app has stopped".
Any help would be much appreciated.
I tried that ionic crosswalk integration too and failed. It seems unfinished to me. It converts the cordova android platform project to gradle build but there the NDK support is not available yet, so I guess that's where ionic browser add crosswalk fails. Gradle is not able to compile / include the native libraries required for Crosswalk.
The manual way however works like a charm:
https://crosswalk-project.org/documentation/cordova/migrate_an_application.html
Section Migrate to Crosswalk