作成したhtmlファイルを格納するフォルダをプロジェクト内に作成し、
build.gradeに認識?させ実行したら、
問題が発生したため、[アプリ名]を終了します。と表示されます。
どのようにしたらよいでしょうか?
import android.app.Activity; import android.os.Bundle; import android.webkit.WebView; public class Html extends Activity{ private WebView wv; @Override protected void onCreate(Bundle paramBundle) { super.onCreate(paramBundle); setContentView(R.layout.ht); this.wv =((WebView)findViewById(R.id.weblmth)); this.wv.loadUrl("file:///android_asset/web.html"); this.wv.setBackgroundColor(0); } }
回答2件
あなたの回答
tips
プレビュー