【发布时间】:2014-02-27 12:40:12
【问题描述】:
在 eclipse/android AVD 中,我得到“不幸的是,已停止”
请帮忙..这是代码 我只是按照其他代码...
我尽我所能我只是不知道 怎么办...
help help help...不是一个完整的程序员...
package com.somedomain.animatedinteractive;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.webkit.WebSettings.PluginState;
import android.webkit.WebView;
public class MainActivity extends Activity {
WebView mWebView;
/** Called when the activity is first created. */
@SuppressLint("SetJavaScriptEnabled")
@SuppressWarnings("deprecation" )
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView = (WebView) findViewById(R.id.action_settings);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginState(PluginState.ON);
mWebView.loadUrl("file:///android_asset/Parable_Book.swf");
mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
mWebView.setBackgroundColor(Color.parseColor("#000000"));
}
}
main.xml
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
【问题讨论】: