开发中遇到的错误及解决方法
文章平均质量分 72
Kyle雨檬
这个作者很懒,什么都没留下…
展开
-
Could not get unknown property ‘packageForR‘ for task ‘:app:processDebugResources‘ of type com.andro
Execution failed for task ':app:processDebugResources'.> Could not get unknown property 'packageForR' for task ':app:processDebugResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.原创 2022-06-06 18:34:30 · 882 阅读 · 1 评论 -
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id ‘c
开始学习kotlin了,自己创建项目不会出错,导别人的项目出现下面的错Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'com.android.application']我试着修改kotlin的版本:ext.kotlin_version保持一致,也不行ext.kotlin_versionGradle版本修改一致还是不行, 百度了下都说加上下原创 2020-10-29 10:22:00 · 1547 阅读 · 0 评论 -
解决recycleView.addItemDecoration方法随着布局刷新间隔不断增大
记录下错误!!!好记性不如烂笔头!!!每次刷新的时候recyclerview都会重复调用addItemDecoration方法。导致每一次刷新recyclerview的间隔都会增大。解决办法如下,使用ItemDecoration的时候先判空就行了,==0就设置,不为0就不设置/**分割线判空*/if (holder.mRecyclerView.getItemDecorationCount() == 0) { holder.mRecyclerView.addItemDe..原创 2020-10-13 18:11:30 · 1134 阅读 · 1 评论 -
android签名文件命令行创建
Key was created with errors:Warning:JKS "keytool -importkeystore -srckeystore D:\AndroidStudioTool\KeyStore\quanok.jks -destkeystore D:\AndroidStudioTool\KeyStore\quanok.jks -deststoretype pkcs12"好久没有写项目,按照老套路在工具里面下一步下一步的创建的jks文件出现错误,下面使用正确的方法来创建1..原创 2020-09-26 17:45:48 · 516 阅读 · 1 评论 -
Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.xxx.app.ui.activity
好记性不如烂笔头!!!错误提示:Caused by: org.greenrobot.eventbus.EventBusException: Subscriber class com.xxx.app.ui.activity.WelcomeActivity and its super classes have no public methods with the @Subscribe annota...原创 2020-05-06 15:10:18 · 1241 阅读 · 0 评论 -
java.net.Unknown Service Exception: CLEARTEXT communication to 192.168.0.40 not permitted by network
这个是我第一次访问后台意思报的错误:中文意思是说 :未知服务异常:明文通信到192.168.0.40是网络安全策略不允许的导致这样的原因是什么呢? 大家可以看下这问大神的解析https://www.jianshu.com/p/53eeb163b19a解决方法:1、在app下的res文件下新建xml文件network_security_config配置如下:<?xm...原创 2020-04-28 09:24:53 · 1248 阅读 · 0 评论 -
Android Studio 编辑器 光标变粗 不能正常输入
普通的光标变粗只需要找到键盘右上角的 Insert按键 按下就可以了。我的这种情况是 安装了ideaVim插件导致的。导致的结果:不能正常删除多行、不能正常复制、粘贴, 只要按住左键选择代码光标就会变粗。解决办法:位置:file-settings->找到Plugins->搜索ideaVim 取消使用(在正中间的Installed里面,移除就可以了),然后重启编辑器就OK...原创 2020-04-17 14:12:32 · 794 阅读 · 0 评论 -
android5.0加载h5页面显示空白
我这个问题出现在android5.0以上---android6.0以下的机子上, 其他版本没问题。客服给我反馈说这些问题全部出现在 oppo、vivo上面,都是android5.1.1的版本上。解决方法:启用mixed content在Android5.0中,WebView方面做了些修改,如果你的系统target api为21以上:系统默认禁止了mixed content和第...原创 2018-10-10 10:44:03 · 10089 阅读 · 9 评论 -
android加载H5界面部分按钮不能触发点击事件及展示不全问题
最近遇到部分H5界面部分不能点击及有些展示出来的H5界面不全,通过客服反馈过来的问题,大部分都是android4.0以上,android6.0以下的系统出的问题,而6.0以上的手机都正常,这是因为前端H5部分代码不支持手机低版本,那么App端就应该想办法去解决这个问题。网上说这个原因是:没有启动webview的html5的本地存储功能(不使用HTML5 DOM存储,不会主动加载到Android...原创 2018-09-18 11:10:09 · 6801 阅读 · 2 评论 -
Error:Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.and
AS 3.0 新建项目报错:错误:Error:Execution failed for task ':app:preDebugAndroidTestBuild'.> Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for a...原创 2018-09-11 11:32:18 · 338 阅读 · 0 评论 -
Could not download okhttp.jar (com.squareup.okhttp3:okhttp:3.8.1)
gradle添加 implementation 'com.squareup.okhttp3:okhttp:3.8.1' 是报错:Unable to resolve dependency for ':app@ReleasesDebug/compileClasspath': Could not download okhttp.jar (com.squareup.okhttp3:ok...原创 2018-09-04 17:15:21 · 12133 阅读 · 12 评论 -
Could not resolve all files for configuration ':library:lintClassPath' Could not find com.android.to
gradle打包出现一下错误:* What went wrong:Could not resolve all files for configuration ':library:lintClassPath'.> Could not find com.android.tools.lint:lint-gradle:26.1.3. Searched in the following locati...原创 2018-06-08 14:09:06 · 11262 阅读 · 4 评论 -
A problem occurred configuring project ':app'. > Failed to notify project evaluation listener. >
出现以下错误的解决方法:* What went wrong:A problem occurred configuring project ':app'.> Failed to notify project evaluation listener. > Could not initialize class com.android.sdklib.repository.AndroidSd...原创 2018-06-11 15:31:19 · 28866 阅读 · 3 评论