Android各种小问题
惟爱丨你
春风十里不如你!
展开
-
解决 TaskExecutionException: Execution failed for task ':app:transformJackWithJackForDebug'
关于TaskExecutionException:Execution failed for task ':app:compileDebugJavaWithJavac'和':app:transformJackWithJackForDebug'.通过亲身受害,爬坑实践证明非常权威有效的解决方案 项目运行本身都是好好的,但就是那么突然,项目需要改一个地方,在发布的页面要修改之前...转载 2018-10-19 10:45:04 · 2394 阅读 · 0 评论 -
解决java.lang.IllegalStateException: The content of the adapter has changed but ListView...的问题
我写了一个Dialog,Dialog中有一个ListView,想要点ListView中的一项后,跳转到另外一个Activity去。但在使用时,会偶尔报出下面的错误:02-21 14:54:28.928: E/AndroidRuntime(2846): FATAL EXCEPTION: main02-21 14:54:28.928: E/AndroidRuntime(2846): jav...转载 2018-10-17 09:52:10 · 2078 阅读 · 0 评论 -
Android8.0之后调用系统相机崩溃问题
1.首先需要在manifest.xml中配置provider: <!--android8.0需要的配置,主要是调用相机--><provider android:authorities="包名.fileprovider" android:name="android.support.v4.content.FileProvider" android:...原创 2018-08-14 09:32:18 · 4460 阅读 · 3 评论 -
Android Textview代码设置字体是否加粗以及无效的解决办法
//字体加粗 static public void setTextBold(TextView textView, boolean isBold) { try { if (textView != null) { Paint paint = textView.getPaint(); if...原创 2018-11-09 16:33:34 · 3941 阅读 · 0 评论 -
将数字转换成以万为单位显示
private String toNumber(int number) { String str = ""; if (number <= 0) { str = ""; } else if (number < 10000) { str = number + "人观看"; ...原创 2019-02-23 10:48:50 · 12055 阅读 · 1 评论