debug javascript in android emulator with phonegap

前端 未结 16 1805
抹茶落季
抹茶落季 2021-01-30 02:45

I am new to phonegap and android development. May I know how can I debug javascript error on the emulator? I have heard about ADB may I know how can I use and install it on wind

16条回答
  •  醉梦人生
    2021-01-30 03:49

    If you're using Phonegap Build and would like to debug using the Chrome console, here's a working solution. It's possible to debug WebViews using USB debugging (https://developer.chrome.com/devtools/docs/remote-debugging#debugging-webviews)

    First, make sure your widget tag contains xmlns:android="http://schemas.android.com/apk/res/android"

    
    

    Then add the following

    
         
    
    

    It works for me on Nexus 5, Phonegap 3.7.0.

    
    

    Build the app in Phonegap Build, install the APK, connect the phone to the USB, enable USB debugging on you phone then visit chrome://inspect.

    Source: https://www.genuitec.com/products/gapdebug/learning-center/configuration/

提交回复
热议问题