Android 未找到可浏览活动的活动
请帮帮我。我想通过浏览器打开html5文件。但我不知道为什么我会因为可浏览的活动错误而发现这个NOACTIVITY 这是我的密码Android 未找到可浏览活动的活动,android,webbrowser-control,Android,Webbrowser Control,请帮帮我。我想通过浏览器打开html5文件。但我不知道为什么我会因为可浏览的活动错误而发现这个NOACTIVITY 这是我的密码 String directory = Environment.getExternalStorageDirectory() + "/cam/"; String html = "/res/raw/test.html"; html = html + directory;
String directory = Environment.getExternalStorageDirectory()
+ "/cam/";
String html = "/res/raw/test.html";
html = html + directory;
Uri fromFile = Uri.fromFile(new File(html));
Intent browserIntent = new Intent(Intent.ACTION_VIEW);
browserIntent.setComponent(new ComponentName(
"com.android.browser",
"com.android.browser.BrowserActivity"));
browserIntent.setData(fromFile);
startActivity(browserIntent);
我已经在安卓里写过了
<activity
android:name="com.example.openhtml.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
非常感谢。emulator或real device?请粘贴您的实际logcat错误跟踪。确保已安装浏览器。有时它可能不在那里。我正在使用real Device致命异常:main android.content.ActivityNotFoundException:找不到显式活动类{com.android.browser/com.android.browser.BrowserActivity};您是否在AndroidManifest.xml中声明了此活动?这是我的LOgCat错误..:(