自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 问答 (1)
  • 收藏
  • 关注

原创 Invalid escape sequence at line 1 column 29 path $[0].name

项目下 gradle.properties 文件中 添加org.gradle.jvmargs = -Dfile.encoding=UTF-8

2021-05-10 21:40:25 109

原创 自定义diaolog弹出,背景有问题出现花屏

在styles里面设置背景透明<item name="android:windowBackground">@color/transparent</item>会出现背景花屏问题只需把颜色改成图片就ok啦<item name="android:windowBackground">@mipmap/ic_beijing</item>亲测Android手机小米7.1.1手机出现这个问题,已解决...

2021-04-07 16:46:46 175

原创 java.lang.IllegalArgumentException Unknown URI: content://downloads/public_downloads/5139

if (isDownloadsDocument(uri)) { final String id = DocumentsContract.getDocumentId(uri); if (id != null && id.startsWith("raw:")) { return id.substring(4); } S...

2020-12-03 13:49:03 696

原创 微信静音功能

静音其实就是关闭麦克风让对方听不见private boolean isJingyi = false;//获取音频服务AudioManager audioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);//设置声音模式audioManager.setMode(AudioManager.STREAM_MUSIC);if (isJingyi) { //关闭麦克风 audioManag...

2020-12-03 11:57:03 282

原创 Inconsistency detected. Invalid view holder adapter positionChatSendViewHolder

这个问题在我这是由于撤回了一条消息适配器更新最后条消息出现的问题mAdapter.notifyItemInserted(mAdapter.getItemCount() - 1);解决1:一般就可以解决问题了,由于我项目需求用这个会出现一些问题所以解决2mAdapter.notifyDataSetChanged();解决2:mAdapter.notifyItemRemoved(i1);用这个更新删除撤回的消息,还有动画效果...

2020-11-27 16:54:55 207

原创 错误:java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)

错误:java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)首先是权限问题(动态权限),不多说我的问题没有解决在清单文件加上:android:requestLegacyExternalStorage="true"OK,解决

2020-08-20 15:45:10 6069

原创 Error: Invoke-customs are only supported starting with Android O (--min-api 26)

build.gradle文件中android节点下增加:compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8}

2020-06-16 14:38:31 106

原创 Failed to find byte code for android/view/View$OnScrollChangeListener

Android Studio 3.1 “Failed to find byte code for * “问题导致Instant Run失败问题解决1 . project’s build.gradle 修改 com.android.tools.build:gradle:3.1.0 -> com.android.tools.build:gradle:3.0.1 2 . gradle-wrapper.properties 修改 distributionUrl=https://servic.

2020-05-21 10:04:57 90

原创 Android TextView使用HTML处理图片文字混合显示

首先添加ImageLoader依赖:implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'之后实例化ImageLoader:ImageLoader imageLoader = ImageLoader.getInstance();imageLoader.init(Image...

2019-08-26 10:58:03 424

原创 当出现一些只有提示但是没有指出具体哪里又bug'得时候

在Terminal 里面输入 -->> gradlew compileDebugSources --stacktrace -info

2019-06-11 11:01:18 87

原创 scrollview 嵌套viewpager 嵌套webview 下面空白面积太大

首先这个不是我自己写得,在网上找了很多唯一一个有效果得代码import android.content.Context;import android.support.annotation.NonNull;import android.support.annotation.Nullable;import android.support.v4.view.ViewPager;impo...

2019-06-11 10:10:40 476 2

原创 Android RecyclerView如何去掉上拉刷新和下拉加载的阴影

recyclerview.setOverScrollMode(View.OVER_SCROLL_NEVER);

2019-06-10 09:42:04 2401

原创 Android recyclerview notifyItemChanged更新数据时页面闪一下

只需要一句代码((SimpleItemAnimator)recyclerView.getItemAnimator()).setSupportsChangeAnimations(false);

2019-06-05 16:53:25 2584 1

原创 has leaked ServiceConnection com.baidu.location.b@3899d18d that was originally bound here

这个问题记录一下这个主要就是定位得时候在ondestory里面停止@Overridepublic void onDestroy() { super.onDestroy(); mLocationClient.stop();}问题解决

2019-06-05 10:11:19 445

原创 [JCoreGlobal] Get sdk version fail![获取sdk版本失败!]

这个问题主要就是极光的额so文件找不到,我当时是so文件放在了jniLibs得文件夹下,在gradle里面写了sourceSets { main { jniLibs.srcDirs = ['libs'] }}还是报错之后我就把jniLibs里得so文件删除,把so文件放到了Libs得文件加下问题解决!!!!!!!!!!!!!!!!!!!!...

2019-06-05 10:04:16 729

原创 Android 后台下载视频

博客新手首先我用得是implementation 'com.liulishuo.filedownloader:library:1.7.6'实现得视频缓存通过service后台下载。下载得状态通过广播发送出去更新UI。代码:首先先创建个service 在清单文件里面注册public class DownloadService extends Service {...

2019-06-03 17:38:59 1299

原创 Invalid escape sequence at line 1 column 29 path $[0].name

我的AS的版本是3.4的dependencies { classpath 'com.android.tools.build:gradle:3.4.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build....

2019-05-29 16:34:35 229

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除