如何调试Android的Cordova插件 [英] How to debug a cordova plugin for Android
问题描述
我为Android创建了cordova插件.但是它不能正常工作.
Hi I have created a cordova plugin for Android. But it is not functioning properly.
我想调试它一个IDE.
I want to debug it an IDE.
在手机上启动应用程序时,如何调试cordova android插件文件?
How can I debug the cordova android plugin file when I launch the application in my mobile?
最简单的方法是什么?
谢谢.
推荐答案
扩大笑松的反应,我使用以下方法: 使用chrome +开发工具+ genymotion调试javascript部分.您可以从检查设备"访问它,也可以调试javascript部分. 问题是调试我自己的插件.为此,我从控制台构建项目"cordova build",然后从项目文件夹将platform \ android的内容导入Android Studio. 修复了gradle gradle的一些错误之后,我可以运行并调试android studio + genymotion,以访问.java文件.
Expanding response of laughingpine, i use this method: Debug javascript part with chrome + dev tools + genymotion. You can access it from "inspect devices" and you can debug javascript part. The problem is for debug my own plugins. For this, i build project "cordova build" from console, and import into Android studio the content of platforms\android from project folders. After repair some errors whit gradle, i can run and debug whit android studio + genymotion, to acces the .java files.
这篇关于如何调试Android的Cordova插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!