
bug 解决
天涯海风
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Android room 在dao中不能使用挂起suspend 否则会报错
首先 我是2024年3月份新创建的项目,所有我的gradle从 Groovy迁移到Kotlin DSL。我觉得问题大概率在这里。把room版本升级到最新版 room_version = “2.6.0-beta01”(其次 有人说是room版本的问题 需要指定到 2.4.0 版本才不会出问题。再就是 有人说把dao中不能使用挂起函数,把suspend 删了就可以了(二、 是否引入了 room-ktx。一、kotlin-kapt。还有大家检查一下几个点。原创 2024-03-28 15:20:27 · 1131 阅读 · 0 评论 -
Fragment切换有两种方 可能引发的问题
add-hide-show方式而上面按钮中出现bug的就是采用第二种方式。然后我们来分析下用add,hide,show为什么出现这种bug,我把每个操作都打印出了以下日志:复现bug的操作是:1.首先打开,默认选中的是第一个tab,如上面的一张图片正常那样。2.切换到tab2,并把tab1 hide掉;3.再切回到tab1,并不会触发tab1对应fragment的任何生命周期;原创 2023-02-11 10:08:34 · 563 阅读 · 0 评论 -
Throwing OutOfMemoryError “Could not allocate JNI Env“
com.moreunion.zhenghao I/art: Background sticky concurrent mark sweep GC freed 74917(4MB) AllocSpace objects, 15(580KB) LOS objects, 7% free, 59MB/64MB, paused 6.228ms total 59.379ms原创 2022-07-22 14:40:18 · 605 阅读 · 0 评论 -
Android 如果查看ANR的问题& 应用程序没有响应,为什么不显示 ANR 弹出窗口?
首先想办法杀死进程,网上搜了好多贴了, 说如果app是因为死锁或者主线程被wait了,可以使用 kill -3 这条命令,然后生成anr文件, 看一下ANR文件夹下有文件吗?不出意外的话肯定有意外意外一: kill -3的命令 输入后根本没反应 我直接 kill 意外二:导出的anr 日志有很多,却没有当天的拓展......原创 2022-07-07 14:59:46 · 1324 阅读 · 0 评论 -
No version of NDK matched the requested version 23.1.7779620. Versions available locally: 21.4.70755
FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:stripNo_authDebugDebugSymbols'.> No version of NDK matched the requested version 23.1.7779620. Versions available locally: 21.4.7075529Caused by: com.android原创 2022-03-29 14:18:39 · 1830 阅读 · 0 评论 -
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
An exception occurred applying plugin request [id: 'com.android.application']> Failed to apply plugin 'com.android.internal.application'. > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of.原创 2022-03-28 11:06:19 · 3609 阅读 · 0 评论 -
【ButterKnife被弃用】Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoi
Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them as annotation attributes原创 2022-03-22 11:41:15 · 5754 阅读 · 3 评论 -
AAPT: error: duplicate attribute.
AAPT: error: duplicate attribute.Android resource compilation failed错误指向 XML 的某个布局看一下你的布局跟我一样, layout 结点和 RelativeLayout 结点 都加了命名空间 xmlns:android删一个,问题就解决了<?xml version="1.0" encoding="utf-8"?><layout xmlns:android="http://schemas.android.c原创 2021-09-28 15:54:36 · 1027 阅读 · 0 评论 -
com.thoughtworks.xstream.InitializationException 打包时偶尔就会报错
// minifyEnabled true// shrinkResources true// zipAlignEnabled trueSUPPORTED_64_BIT_ABIS=[Ljava.lang.String;@21381e5versionCode=2020111117BOARD=msm8952BOOTLOADER=unknownTYPE=userID=MMB29MTIME=1506404348000BRAND=nu原创 2021-08-06 15:04:48 · 1003 阅读 · 0 评论 -
ExceptionInInitializerError
问题Execution failed for task ':app:compileDebugJavaWithJavac'.java.lang.ExceptionInInitializerError解决修改调整 JDK原创 2021-07-16 11:09:44 · 314 阅读 · 0 评论 -
android studio greendao Pb(324) The type java.lang.Object cannot be resolved.
升级android studio4.2.2之后,greendao的Entity注解发生错误解决方法: 升级greendao 3.2.2 --> 3.3.0implementation 'org.greenrobot:greendao:3.3.0'org.greenrobot:greendao-gradle-plugin:3.3.0Found 3 problem(s) parsing "D:\App_winspread\IntelligentStationPhone_BlackBox\ba原创 2021-07-08 16:49:00 · 3244 阅读 · 4 评论 -
写了个自定义属性 Application namespace for attribute app:imageUrl will be ignored.
Application namespace for attribute app:imageUrl will be ignored.原来的定义@BindingAdapter({"bind:imageUrl"})修改后的,差别就是 bind: 删掉了@BindingAdapter({"imageUrl"})布局引用的时候也一样,把bind删了就行<ImageView imageUrl="@{url}" android:layout_width="wrap_content"原创 2021-06-03 10:12:23 · 921 阅读 · 0 评论 -
安卓瘦身打包上线 android 血案
//在4字节边界上对齐 系统就能更加快速的调用APP内的资源 zipAlignEnabled true //用来开启删除无用代码 minifyEnabled true //开启删除无用资源 shrinkResources true原创 2020-12-03 17:24:16 · 189 阅读 · 0 评论 -
MqttAndroidClient.registerReceiver
Android开发MQTT 客户端 出现莫名问题client.connect(conOpt, MyApp.getInstance(), new IMqttActionListener()连接时报错,说找不到一个广播, 注册广播失败MqttAndroidClient.registerReceiver原因很简单 就是Android X 缺少 V4包导致的 ,解决方法很简单要么加上V4包 ,要么不用 X...原创 2020-11-12 15:06:49 · 361 阅读 · 0 评论 -
make sure class name exists, is public, and has an empty constructor that is public
关于make sure class name exists, is public, and has an empty constructor that is public解决办法环境:安卓8.0以上版本多出现在 vivo Y83 手机java.lang.RuntimeException:Unable to start activity ComponentInfo{me.jessyan...原创 2019-09-18 17:45:21 · 734 阅读 · 0 评论 -
Butterknife(10.0.0):Manifest merger failed的坑
编译器版本: android studioSDk版本: 28gradle 版本:3.3.2wrapper: gradle-4.10.1-all.zip添加最新的butterKnife 编译出错解决方法1: 降低版本implementation 'com.jakewharton:butterknife:8.4.0'annotationProcessor 'com.jakewharton...原创 2019-03-28 11:35:38 · 408 阅读 · 0 评论 -
Failed to resolve: cn.leancloud.android:hmsagent:4.7.8
集成LeanCloud 时完全按照官方文档来的 结果报错Failed to resolve: cn.leancloud.android:hmsagent:4.7.8原因分析: 我没有导入这个包也没有使用,编译器为什么要去引用呢 ? 肯定是我导入的包引用了,于是我逐一删除导入的包,删除到 混合推送需要的包 时成功了 . 这是android studio 升级后 不能导入模块引入的jar包所导致...原创 2018-12-13 16:37:16 · 1080 阅读 · 0 评论 -
Error:Execution failed for task ':app:buildInfoDebugLoader'
今天本来运行很好的工程,突然报这个错误:(Error:Execution failed for task ‘:app:buildInfoDebugLoader’.)Error:Execution failed for task ':app:buildInfoDebugLoader'.> Exception while doing past iteration backup : Source /ho原创 2016-10-31 17:24:29 · 259 阅读 · 0 评论 -
使用Butter Knife报空指针
如果你使用的Butter Knife版本过高,只依赖了一个库文件,在AS中使用Butter Knife工具时,就会报空指针. btn1.setOnClickListener(listener);//空指针推荐使用版本: compile 'com.jakewharton:butterknife:7.0.1'原创 2016-10-31 17:31:20 · 382 阅读 · 0 评论 -
安卓真机测试:Installation error: INSTALL_CANCELED_BY_USER
这个错误,从字面上理解,就是已经安装的时候被用户取消了。 我出现这个错误的时候,是手机连接在电脑上的,上午还好好的用着下午就挂了. 经过网上搜索,确认这是安装apk到手机时,被手机取消了安装操作。 确保手机处于开发者模式。 在手机上,勾选 系统设置->安全->未知来源 ,然后重试。 安装的时候手机是否处于锁屏状态,若是的话,取消锁屏。 有的手机需要手动安装。如小米3 其原创 2016-11-07 14:38:28 · 628 阅读 · 3 评论 -
点击第一次无效,第二次有效, 给TextView设置点击事件时
方法一: 尝试将 focusableInTouchMode设置为 falseandroid:focusable="true"android:focusableInTouchMode="false"方法二: 看是不是自己添加了 没用的属性 例如 textIsSelectable textIsSelectable 是设置文字可以被选择复制粘贴的,原创 2016-12-08 09:22:46 · 4013 阅读 · 2 评论 -
android点击Home键后,在打开应用,应用会重新启动,而不是恢复到原来状态
这个问题是因为在AndroidManifest.xml中, 你的启动activity中加了android:launchMode=”singleTask” 删了就OK了原创 2016-12-27 17:11:16 · 1545 阅读 · 2 评论 -
AlertDialog 按钮不显示 按钮颜色设置问题
先看下这个问题解决问题的方法有两个:1. 通过自定义弹窗主题的方法 ,这种方法是通用的,只要设置一次就够了. 自定义个主题继承自Theme.AppCompat.Light.Dialog.Alert 设置colorAccent 颜色即可 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <!原创 2017-01-13 14:52:44 · 6457 阅读 · 1 评论 -
Android studio报错:app:mergeDebugResources FAILED(记一次痛苦不堪的debug)
转载 http://blog.csdn.net/runner__1/article/details/53482565转载 2017-03-28 09:43:38 · 1316 阅读 · 0 评论 -
android 开发真机测试,无法安装调试解决
Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: /data/app/vmdl2043454148.tmp/3_dependencies signatures are inconsistent.It is possible that this issue is reso原创 2017-10-25 11:35:26 · 4204 阅读 · 0 评论 -
android studio 3.0 V7 包版本 glide4.6.1
首先贴出错误Logjava.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface; in class Landroid/support/v4/...原创 2018-03-07 14:06:11 · 940 阅读 · 0 评论 -
androidStudio 真机调试 之魅族手机 不打印log
魅族手机 (魅蓝Note5 系统Flyme7.0.1.0) (注意: 如果你的手机扩展功能里没有, 最好恢复一下出厂设置,我的手机就是 ,真是奇葩的 魅族系统 ) 解决方法: 1.辅助功能 2.开发者选项 3.扩展功能—&gt;性能优化 4.高级日志输出 5.全部允许 ...原创 2018-09-13 11:09:35 · 3029 阅读 · 5 评论 -
App is not indexable by Google Search; (问题贴,大神求回复 AS 版本V3.2.1)
App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details. less… (Ctrl+F1)Adds URLs to get your app into t...原创 2018-10-15 14:47:04 · 560 阅读 · 0 评论 -
添加了 butterknife 同步出现错误
com.android.ide.common.process.ProcessException: Failed to execute aapt首先 butterknife 与compileSdkVersion/targetSdkVersion /V7包 的版本有很大关系当我用最新的 9.0.0-rc1测试 可行(1)compileSdkVersion 28targetSdkVersio...原创 2018-10-15 16:24:57 · 745 阅读 · 2 评论 -
android studio 3.2+ FAILURE: Build failed with an exception.
FAILURE: Build failed with an exception.What went wrong:Execution failed for task ‘:baselibrary:compileDebugJavaWithJavac’.Compilation failed; see the compiler error output for details.Try:Ru...原创 2018-12-12 14:42:38 · 756 阅读 · 0 评论 -
是时候整理下这些编译带来的奇葩问题了 android studio3.0 studio3.1 studio3.2 studio3.+
1老项目打开 V4 V7 包 引入的方法和类找不到的问题解决方法:删除这个出错的项目2.重新导入项目,编译3.解决原创 2018-12-13 15:17:38 · 166 阅读 · 0 评论 -
解决 Genymotion 下无法安装apk的问题
An error occured while deploying the file. This probably means that the app contains ARM native code and your Genymotion device cannot run ARM instructions. You should either build your native code t原创 2017-09-05 11:32:58 · 1730 阅读 · 2 评论