Google TV emulator without chrome browser?

倖福魔咒の 提交于 2019-12-20 03:14:27

问题


Is it normal not to have the Google Chrome browser on a google TV emulator in a Linux machine with KVM enabled? When launching an Intent from my application that hits a web page, I get the error message "No activity found to handle intent {act=android.intent.action.VIEW, dat=http://...}" and I have tried several web addresses. The code from My Activity is this and it works fine in other android platforms:

Intent myIntent= new Intent(Intent.ACTION_VIEW,
                           Uri.parse( "http://www.test.com");
startActivity(myIntent);

Am I missing some step to install the Google Chrome browser? On the other hand I can not find the Google Market application neither.


回答1:


Sadly it is normal not to have the Chrome browser installed with the emulator. This does make it a bit of a pain to do things like you are trying currently. I'm not sure if there are plans for adding Chrome to the emulator in the future, but in the meantime it is possible to install Browser.apk (the Android browser) to the emulator (via adb install Browser.apk, which you can either build from AOSP, or possible pull from a device or standard Android emulator via adb pull /system/app/Browser.apk - I think this is the default Browser location on devices).

Once Browser.apk is installed you should be able to test these things as you would expect.

So the steps are:

  1. Start an emulator with Android 3.1 running
  2. adb -s device_id pull /system/app/Browser.apk
  3. adb -s device_id install Browser.apk


来源:https://stackoverflow.com/questions/8209387/google-tv-emulator-without-chrome-browser

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