I am working on an Ionic Angular project and I need to build an APK file to distribute my app to Android devices. I have tried researching and following various tutorials, but I'm still facing some difficulties. Could someone please guide me through the process of building an APK for my Ionic Angular project?
ionic capacitor add android
ionic : File C:\Users\team\AppData\Roaming\npm\ionic.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1
- ionic capacitor add android
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
First of all you have to set _Execution_Policies
Just Open powershell in administrative mode and run the following command
"Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted"
Then
In android Studio go to build and click (APK)
Hope this will work