1、软件打开闪退
是因为UseCodeCacheFlushing这个无法识别,得去掉studio.exe.vmoptions这个文件里面的第五行就行了。
2、更改studio使用的jdk
studio API 21 最低jdk1.7
3、WebView.destroy() called while still attached!
错误:
public void onDestroy() {
super.onDestroy();
if (webView != null)
webView.destroy();
}
改正后:
public void onDestroy() {
if (webView != null) {
ViewGroup parent = (ViewGroup) webView.getParent();
if (parent != null) {
parent.removeView(webView);
}
webView.removeAllViews();
webView.destroy();
}
super.onDestroy();
}
}