first we need to turn our phone to Mode developer and we should have android studio and Ionic installed in our machine
follow those step to rach our goal and run our app direclty in our phone :
**
wirless debuging
**
for using wirless debuging we need to install scrcpy
if you don't have it yet in your machine
now go to github and Download
open your powershell :
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
scoop install scrcpy
scoop install adb
and go to path and add adb C:\Users\Huawei\Downloads\scrcpy-win64-v2.0 (1)\scrcpy-win64-v2.0
to run mobile with your laptop go in powershell :
connect your phone first using USB Debugging
adb tcpip 5555
now disconnect your phone ( removing USB )
go to about in phone and get ip adress connected to wifi
adb connect ipaddresswifi:5555
then run :
scrcpy
now let open our ionic project in vs Code and run the following Command Line :
ionic build --prod
npm install @capacitor/android --force
Run the following command to add the Android platform to your project:
npx cap add android
Next, run the following command to synchronize your project with the added platform:
This will ensure that the necessary files and dependencies are updated in your Android project.
npx cap sync android
Once the synchronization is complete, you can proceed with opening your Android project in Android Studio by running the following command:
npx cap open android
In Android Studio, click on the "Run" menu and select "Run 'app'".
I hope you find this tutorial helpful.
Top comments (0)