美文网首页
android studio

android studio

作者: 读书人heart | 来源:发表于2019-06-17 10:28 被阅读0次

快速启动
setting里面的
instant run

RxJava2错误
PID: 18453
io.reactivex.exceptions.OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call. Further reading: https://github.com/ReactiveX/RxJava/wiki/Error-Handling | java.util.NoSuchElementException

 RxJavaPlugins.setErrorHandler(throwable -> {
            //异常处理
            Log.e("test-RxJavaPlugins",throwable.getMessage()+"");
        });

适配9.0以上版本https网络请求权限
在application里面
android:usesCleartextTraffic="true"
在application内部
<uses-library android:name="org.apache.http.legacy" android:required="false" />

Only fullscreen activities can request orientation
https://blog.csdn.net/starry_eve/article/details/82777160

android WebView 禁止长按出现复制菜单
webview.setLongClickable(true);
webview.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return true;
}
});

webview 注入js函数

wb.evaluateJavascript("javascript:(function(){document.querySelector(\".button-submit\").click()})()", new ValueCallback<String>() {
                        @Override
                        public void onReceiveValue(String s) {
                            Log.e("test","点击回调:" + s);
                        }
                    });

webview获取网页源码

 wb.loadUrl("javascript:HTMLOUT.test(document.documentElement.outerHTML);");

android studio 每次打开都会等很久(在重新下包)


Snipaste_2020-03-09_09-54-36.png

相关文章

网友评论

      本文标题:android studio

      本文链接:https://www.haomeiwen.com/subject/uebofctx.html