chrome ARC-Welder javascript console plugin not defined

浪子不回头ぞ 提交于 2019-12-21 11:08:10

问题


I installed ARC_Welder to test run my android apps. App runs , but I was trying to get logs. I read this article : https://developer.chrome.com/apps/getstarted_arc .

Tried running -- plugin.shell('adbd') in JavaScript console (chrome://inspect/#apps) .

But i'm getting this error : Uncaught ReferenceError: plugin is not defined

Same thing happened when tried running : plugin.shell('logcat');

I'm not a chrome javascript developer. please help me understand where i am wrong..


回答1:


I just had the same issue, the instructions on the page you mentioned are correct, but not very clear.

You should:

  1. Open your debug APK in ARC Welder and run it
  2. Open logcat in Android Studio, (or what ever tool you normally use to view logcat).
  3. Open Chrome and type "chrome://inspect/#apps" in the address bar
  4. Hopefully you see your App name listed, click the 'inspect' link for your app.
  5. In the Javascript Console that appears type "plugin.shell('adbd')" and press enter.
  6. Now go back to Android Studio and you should see a load of log messages in the logcat, filter by your app name and hopefully you are good to go.



回答2:


Are you sure you opened your apps page by clicking the "inspect" link from the "chrome://inspect/#apps" page?

The error you see suggests that you are typing it into some javascript console that isn't for an app view. The "plugin" name is only defined for use by Chrome apps and extensions, and not arbitrary web pages.



来源:https://stackoverflow.com/questions/29519302/chrome-arc-welder-javascript-console-plugin-not-defined

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!