Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/182.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 当我按下按钮时应用程序强制关闭_Java_Android_Android Studio_Android Activity_Forceclose - Fatal编程技术网

Java 当我按下按钮时应用程序强制关闭

Java 当我按下按钮时应用程序强制关闭,java,android,android-studio,android-activity,forceclose,Java,Android,Android Studio,Android Activity,Forceclose,当我按下工具栏上的“打印”按钮时,我的应用程序关闭。。我想我把密码放错地方了?也许代码错了?或者别的什么 MainActivity.java: package com.vvhvb.hesselfeenstra.vvheerenveenseboys; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import a

当我按下工具栏上的“打印”按钮时,我的应用程序关闭。。我想我把密码放错地方了?也许代码错了?或者别的什么

MainActivity.java:

package com.vvhvb.hesselfeenstra.vvheerenveenseboys;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
        setSupportActionBar(toolbar);

        String url ="http://dehvb.nl/";
        WebView view=(WebView) this.findViewById(R.id.webView);
        view.getSettings().setJavaScriptEnabled(true);
        view.getSettings().setBuiltInZoomControls(true);
        view.getSettings().setDisplayZoomControls(false);
        view.loadUrl(url);

    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);

        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        Button btnSimple = (Button) findViewById(R.id.action_about);
        btnSimple.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(v.getContext(), about.class);
                startActivityForResult(intent, 0);
            }
        });

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_about) {
            return true;


        }

        return super.onOptionsItemSelected(item);
    }
}
关于.java

package com.vvhvb.hesselfeenstra.vvheerenveenseboys;


import android.app.Activity;
import android.os.Bundle;

public class about extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about);

    }


}
日志:

06-12 11:53:10.441 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/WebViewFactory: Loading com.google.android.webview version 50.0.2661.86 (code 266108600)
06-12 11:53:10.441 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/ResourcesManager: getTopLevelResources: /data/app/com.google.android.webview-2/base.apk / 1.0 running in com.vvhvb.hesselfeenstra.vvheerenveenseboys rsrc of package com.google.android.webview
06-12 11:53:10.451 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/ResourcesManager: For user 0 new overlays fetched Null
06-12 11:53:10.451 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/InjectionManager: Inside getClassLibPath caller 
06-12 11:53:10.461 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 9936-9938)
06-12 11:53:10.461 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader: Expected native library version number "50.0.2661.86", actual native library version number "50.0.2661.86"
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {bde8c1c}
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader: Expected native library version number "50.0.2661.86", actual native library version number "50.0.2661.86"
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/chromium: [INFO:library_loader_hooks.cc(143)] Chromium logging enabled: level = 0, default verbosity = 0
06-12 11:53:10.501 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
06-12 11:53:10.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/ApkAssets: Error while loading asset assets/natives_blob_64.bin: java.io.FileNotFoundException: assets/natives_blob_64.bin
06-12 11:53:10.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/ApkAssets: Error while loading asset assets/snapshot_blob_64.bin: java.io.FileNotFoundException: assets/snapshot_blob_64.bin
06-12 11:53:10.521 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL: loaded /vendor/lib/egl/libGLES_mali.so
06-12 11:53:10.551 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL: eglInitialize EGLDisplay = 0xffccd144
06-12 11:53:10.611 15392-15527/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/cr_media: Requires BLUETOOTH permission
06-12 11:53:10.631 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
06-12 11:53:10.631 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.WebViewContentsClientAdapter$WebResourceErrorImpl>
06-12 11:53:10.681 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
06-12 11:53:10.691 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art: Rejecting re-init on previously-failed class java.lang.Class<org.chromium.content.browser.FloatingWebActionModeCallback>
06-12 11:53:10.711 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor
06-12 11:53:10.731 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
06-12 11:53:10.731 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: false
06-12 11:53:10.791 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_Ime: ImeThread is not enabled.
06-12 11:53:10.801 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/Activity: performCreate Call Injection manager
06-12 11:53:10.801 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/InjectionManager: dispatchOnViewCreated > Target : com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity isFragment :false
06-12 11:53:10.811 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
06-12 11:53:10.811 15392-15572/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
06-12 11:53:10.811 15392-15572/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL: eglInitialize EGLDisplay = 0xde341864
06-12 11:53:10.831 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/PhoneWindow: *FMB* isFloatingMenuEnabled mFloatingMenuBtn : null
06-12 11:53:10.831 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/PhoneWindow: *FMB* isFloatingMenuEnabled return false
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL: eglInitialize EGLDisplay = 0xde43fc54
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/OpenGLRenderer: Initialized EGL, version 1.4
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/OpenGLRenderer: HWUI protection enabled for context ,  &this =0xf4f12490 ,&mEglDisplay = 1 , &mEglConfig = -185306468 
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/OpenGLRenderer: Get maximum texture size. GL_MAX_TEXTURE_SIZE is 8192
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/OpenGLRenderer: Enabling debug mode 0
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/mali_winsys: new_window_surface returns 0x3000,  [1080x1920]-format:1
06-12 11:53:11.101 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/InjectionManager: dispatchCreateOptionsMenu :com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity
06-12 11:53:11.101 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/InjectionManager: dispatchPrepareOptionsMenu :com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity
06-12 11:53:11.271 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@3253f19b time:6070740
06-12 11:53:11.501 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 15392
06-12 11:53:11.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime: [InputMethodManagerWrapper.java:59] isActive: true
06-12 11:53:11.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime: [InputMethodManagerWrapper.java:68] hideSoftInputFromWindow
06-12 11:53:16.391 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
06-12 11:53:16.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/InjectionManager: dispatchOptionsItemSelected :com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity
06-12 11:53:16.481 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/AndroidRuntime: Shutting down VM
06-12 11:53:16.481 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                             Process: com.vvhvb.hesselfeenstra.vvheerenveenseboys, PID: 15392
                                                                                             java.lang.ClassCastException: android.support.v7.view.menu.ActionMenuItemView cannot be cast to android.widget.Button
                                                                                                 at com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity.onOptionsItemSelected(MainActivity.java:48)
                                                                                                 at android.app.Activity.onMenuItemSelected(Activity.java:3201)
                                                                                                 at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:403)
                                                                                                 at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:189)
                                                                                                 at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
                                                                                                 at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:100)
                                                                                                 at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:69)
                                                                                                 at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:169)
                                                                                                 at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:760)
                                                                                                 at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:811)
                                                                                                 at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
                                                                                                 at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:958)
                                                                                                 at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:948)
                                                                                                 at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:618)
                                                                                                 at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:139)
                                                                                                 at android.view.View.performClick(View.java:5246)
                                                                                                 at android.widget.TextView.performClick(TextView.java:10604)
                                                                                                 at android.view.View$PerformClick.run(View.java:21256)
                                                                                                 at android.os.Handler.handleCallback(Handler.java:739)
                                                                                                 at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                                 at android.os.Looper.loop(Looper.java:145)
                                                                                                 at android.app.ActivityThread.main(ActivityThread.java:6917)
                                                                                                 at java.lang.reflect.Method.invoke(Native Method)
                                                                                                 at java.lang.reflect.Method.invoke(Method.java:372)
                                                                                                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
                                                                                                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
06-12 11:53:19.991 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/Process: Sending signal. PID: 15392 SIG: 9
06-12 11:53:10.441 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/webview工厂:加载com.google.android.webview版本50.0.2661.86(代码266108600)
06-12 11:53:10.441 15392-15392/com.vvvb.hesselfeenstra.vvheerenveenseboys W/ResourcesManager:gettoplavelresources:/data/app/com.google.android.webview-2/base.apk/1.0运行在com.google.android.webview包的com.vvvvvbvb.heerenveensenstra.vheerenveenseboys rsrc中
06-12 11:53:10.451 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveensed/ResourcesManager:对于用户0,获取的新覆盖为空
06-12 11:53:10.451 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/注入管理器:内部getClassLibPath调用程序
06-12 11:53:10.461 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader:加载本机库的时间:2毫秒(时间戳9936-9938)
06-12 11:53:10.461 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader:预期本机库版本号“50.0.2661.86”,实际本机库版本号“50.0.2661.86”
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys V/WebViewChromiumFactoryProvider:将铬绑定到主活套活套(主活套,tid 1){bde8c1c}
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_LibraryLoader:预期本机库版本号“50.0.2661.86”,实际本机库版本号“50.0.2661.86”
06-12 11:53:10.471 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/chromium:[INFO:library\u loader\u hooks.cc(143)]chromium日志记录已启用:级别=0,默认详细程度=0
06-12 11:53:10.501 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_浏览器启动:初始化铬进程,单进程=true
06-12 11:53:10.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/ApkAssets:加载资产时出错/natives\u blob\u 64.bin:java.io.FileNotFoundException:assets/natives\u blob\u 64.bin
06-12 11:53:10.511 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/ApkAssets:加载资产时出错/snapshot_blob_64.bin:java.io.FileNotFoundException:assets/snapshot_blob_64.bin
06-12 11:53:10.521 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL:loaded/vendor/lib/egl/libGLES_mali.so
06-12 11:53:10.551 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL:eglInitialize EGLDisplay=0xffccd144
06-12 11:53:10.611 15392-15527/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/cr_媒体:需要蓝牙许可
06-12 11:53:10.631 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art:拒绝在以前失败的类java.lang.class上重新初始化
06-12 11:53:10.631 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art:拒绝在以前失败的类java.lang.class上重新初始化
06-12 11:53:10.681 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art:拒绝在以前失败的类java.lang.class上重新初始化
06-12 11:53:10.691 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/art:拒绝在以前失败的类java.lang.class上重新初始化
06-12 11:53:10.711 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime:[InputMethodManagerRapper.java:30]构造函数
06-12 11:53:10.731 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys W/cr_AwContents:ondetached从已分离的窗口调用。忽略
06-12 11:53:10.731 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/cr_Ime:[InputMethodManagerRapper.java:59]isActive:false
06-12 11:53:10.791 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/cr_-Ime:ImeThread未启用。
06-12 11:53:10.801 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveensed/Activity:performCreate呼叫注入管理器
06-12 11:53:10.801 15392-15392/com.vvhvb.heselfeenstra.vvheerenveenseboys I/注射管理器:DispatchenViewCreated>Target:com.vvhvb.heselfeenstra.vheerenveenseboys.main活动片段:false
06-12 11:53:10.811 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveensed/OpenGLRenderer:使用EGL交换行为保存:true
06-12 11:53:10.811 15392-15572/com.vvhvb.hesselfeenstra.vvheerenveenseboys E/libEGL:validate_display:255 error 3008(EGL_BAD_display)
06-12 11:53:10.811 15392-15572/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL:eglInitialize EGLDisplay=0xde341864
06-12 11:53:10.831 15392-15392/com.vvhvb.heselfeenstra.vvheerenveensed/PhoneWindow:*FMB*isFloatingMenuEnabled mFloatingMenuBtn:null
06-12 11:53:10.831 15392-15392/com.vvhvb.heselfeenstra.vvheerenveensed/PhoneWindow:*FMB*isFloatingMenuEnabled返回false
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/libEGL:eglInitialize EGLDisplay=0xde43fc54
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/OpenGLRenderer:初始化EGL,版本1.4
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/OpenGLRenderer:HWUI为上下文启用了保护,&this=0xf4f12490,&mEglDisplay=1,&mEglConfig=-185306468
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveensed/OpenGLRenderer:获取最大纹理大小。GL_最大_纹理_大小为8192
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveensed/OpenGLRenderer:启用调试模式0
06-12 11:53:10.891 15392-15571/com.vvhvb.hesselfeenstra.vvheerenveenseboys D/mali_winsys:new_window_surface返回0x3000,[1080x1920]-格式:1
06-12 11:53:11.101 15392-15392/com.vvhvb.heselfeenstra.vvheerenveenseboys I/注射经理:DispatchCreateOptions菜单:com.vvhvb.heselfeenstra.vheerenveenseboys.main活动
06-12 11:53:11.101 15392-15392/com.vvhvb.hesselfeenstra.vvheerenveenseboys I/注射经理
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

</RelativeLayout>
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>

    <include layout="@layout/content_main" />

</android.support.design.widget.CoordinatorLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.vvhvb.hesselfeenstra.vvheerenveenseboys.MainActivity"
    tools:showIn="@layout/activity_main">

    <WebView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/webView"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />
</RelativeLayout>
Button btnSimple = (Button) findViewById(R.id.action_about);
ActionMenuItemView btnSimple = (ActionMenuItemView) findViewById(R.id.action_about);
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
           getMenuInflater().inflate(R.menu. menu_main, menu);
    }
    public boolean onOptionsItemSelected(MenuItem item) {
        if(item.getItemId() == R.id.action_about){
           Intent intent = new Intent(getContext(), about.class);
           startActivityForResult(intent, 0);
        }
        return super.onOptionsItemSelected(item);
    }
android.support.v7.view.menu.ActionMenuItemView cannot be cast to android.widget.Button
 Button btnSimple = (Button) findViewById(R.id.action_about);
        btnSimple.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Intent intent = new Intent(v.getContext(), about.class);
                startActivityForResult(intent, 0);
            }
        });