
android Bug处理
android Bug处理
安果移不动
精通Android,Swift,Flutter,Python,Php,按键精灵,易语言。曾为华为录制精品课程,拥有资质:按键精灵顶级证书;
产品秀:https://www.anguomob.com
B站:https://space.bilibili.com/482453235
展开
-
错误: 找不到或无法加载主类 org.gradle.wrapper.GradleWrapperMain
git 忽略文件把这个文件忽略了gradle-wrapper.jar从别的地方copy一份就好了原创 2021-03-29 12:50:20 · 1272 阅读 · 0 评论 -
android application方法执行两次
是由于进程引起的 <service android:process=":remote"> </service>导致了application的多次创建。解决办法:判断当前进程,选择不同的进程做对应的初始化操作即可。 /** * 获取当前进程名 */ pri...原创 2020-03-09 17:51:36 · 1361 阅读 · 0 评论 -
fullSensor
将Android Sutdio升级到了3.6.0。现在,我的Manifest.xml文件中出现以下错误。Expecting 'android:screenOrientation="unspecified"' or '"fullSensor"' for this activity so the user can use the application in any orientation an...原创 2020-02-28 00:38:37 · 8526 阅读 · 1 评论 -
Caused by: java.lang.RuntimeException: Failed to create最新android studio3.6 无法新建项目
升级studio导致的居然跟distributionUrl 和项目级别build.gradle无关 classpath 'com.android.tools.build:gradle:3.6.0'解决方案删除c盘C:\Users\liuan\.android目录再启动as重新新的配置就好了as还需要完善啊如果不出所料的话...原创 2020-02-26 00:32:58 · 1551 阅读 · 0 评论 -
Android Studio Error—Gradle: 错误:编码 GBK 的不可映射字符的
产生原因分析:项目太旧导致的解决方案:对应项目级别build.gradle最下方添加tasks.withType(JavaCompile) { options.encoding = "UTF-8"}原创 2020-02-25 11:59:18 · 472 阅读 · 0 评论 -
butterknife升级10.1.0(此版本支持支持androidX)
遇到Failed to transform artifact 'butterknife-runtime.aar (com.jakewharton:butterknife-runtime:10.1.0)'解决:给所有的 Module 加入jdk1.8在 build.gradle 的 android 下加入下面代码 即可解决compileOptions { source...原创 2019-10-14 20:50:33 · 1172 阅读 · 0 评论 -
ore than one file was found with OS independent path 'META-INF/androidx.localbroadcastmanager_localb
项目 build.gradle 的 android节点下新增 packagingOptions { exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version' exclude 'META-INF/androidx.swiperefreshlayout_sw...原创 2019-10-14 19:52:10 · 1792 阅读 · 0 评论 -
studio构建错误Element uses-permission#android.permission.ACCESS_NETWORK_STATE at AndroidManifest.xml:38:
权限声明重复,删除重复的留下一个即可原创 2019-10-14 19:09:08 · 3263 阅读 · 0 评论 -
Error:Could not find bundletool.jar(com.android.tools.build:bundletool:0.1.0
根build.gradle中 把那个resp google()放在jencenter 上面即可 repositories { google() jcenter() }原创 2019-10-14 18:48:59 · 219 阅读 · 0 评论 -
AndroidManifest 解决 【quires a placeholder substitution but no value for is provided.】问题
前言问题出现原因:as从targetVersion 23------》28${name}:name 就是你定义的占位符的名字举个栗子: ${huawei_push_appid}<meta-data android:name="com.huawei.hms.client.appid" android:value="${huawei_push_appid}" &g...原创 2019-08-29 14:25:25 · 5597 阅读 · 0 评论 -
has leaked window DecorView@9f2ea24[] that was originally added here
android.view.WindowLeaked: Activity com.gdvictor.dbconductorcenter.activity.ShortVideoPlayActivity has leaked window DecorView@9f2ea24[] that was originally added here ...原创 2019-03-07 15:40:43 · 3773 阅读 · 0 评论 -
解决"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"错误
今天安装了Android Studio 3.2,打开一个旧工程,编译提示"No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android"网上也有解决办法,就是下载旧版的NDK,将其中的toolchain复制到新版的NDK中但是感觉这种方式,不是解决的正道。经过对新...转载 2019-02-02 16:39:11 · 379 阅读 · 0 评论 -
Could not find bundletool.jar
发生背景as 从死3.2升级到了3.3发生问题ERROR: Could not find bundletool.jar (com.android.tools.build:bundletool:0.1.0-alpha01).Searched in the following locations: https://jcenter.bintray.com/com/android/t...原创 2019-01-17 15:32:11 · 2663 阅读 · 0 评论 -
Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]
平台版本是android 7.0,在adb install *.apk 会提示下面的错误: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]方法1:修改AndroidManifest.xml 中android:testOnly="true" 改成 android:testOnly="false",或者直接去掉。方法2:a...原创 2019-01-03 16:32:44 · 4483 阅读 · 0 评论 -
java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
android 9.0 api28 Process: com.liuan.freereader, PID: 30232 java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed at android.graphics.Canvas.c...原创 2018-12-26 11:11:43 · 5588 阅读 · 3 评论 -
Android 如何快速找到在那个页面
关键字ActivityManager然后清空控制台 打开一个页面即可看到仅仅关于页面的信息原创 2018-12-20 17:38:29 · 585 阅读 · 0 评论 -
Unable to add window -- token null is not valid; is your activity running?
您尝试过早显示popUpWindow,修复它,将Id作为主布局main_layout并使用下面的代码时会发生此错误Java的: findViewById(R.id.main_layout).post(new Runnable() { public void run() { popupWindow.showAtLo...原创 2018-10-02 01:04:46 · 1738 阅读 · 0 评论 -
Android方法数methods超过65536
当Android App中的方法数超过65535时,如果往下兼容到低版本设备时,就会报编译错误: Cannot fit requested classes in a single dex file. Try supplying a main-dex list. # methods: 86204 > 65536 Message{kind=ERROR, tex...原创 2018-09-29 18:19:59 · 214 阅读 · 0 评论 -
安装APK错误 Failure [INSTALL_CANCELED_BY_USER]
今天在同事的手机上运行了项目的app出现了一个 Failure [INSTALL_CANCELED_BY_USER],意思就是“安装被用户取消”整个流程我先附上图之后我们在说说怎么解决吧,希望文章对你有帮助 解决方案:我在网上找了一些资料,然后stackoverflow.com上发现了方法。他这里主要是我们手机上的安装权限问题面对MI设备相同的问题,并通过以下步骤来...原创 2018-09-28 17:27:04 · 7005 阅读 · 0 评论 -
greenDao Property '' is not part of
哼哼哼 greenDao 使用 QueryBuilder<Student> builder = manager.getDaoSession().queryBuilder(Student.class);// 逻辑与 List<Student> list = builder.where(StudentDao.Propert...原创 2018-09-25 16:17:35 · 1292 阅读 · 0 评论 -
v4jar包keyeventcompat不存在的错误
Error:(30, 31) 错误: 找不到符号符号: 类 KeyEventCompat位置: 程序包 android.support.v4.view 解决:KeyEventCompat类被取消了 hasNoModifiers方法已经被KeyEvent实现了报错: if (KeyEventCompat.hasNoModifiers(event)) { ...原创 2018-09-17 18:29:22 · 1293 阅读 · 2 评论 -
androidstudio3.0使用butterknife报错解决- butterknife-7.0.1.jar
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor c...原创 2018-09-17 18:26:57 · 383 阅读 · 0 评论 -
Error:android-apt plugin is incompatible with the Android Gradle plugin. Please use 'annotationProc
我更新 Android Studio2.3.3到3.0版本后,同时也更新了gradle到4.1后,就出现了这个问题。直接上解决办法:一、注释掉module的buid.gradle下 // 应用插件//apply plugin: 'com.neenbedankt.android-apt'或者是这样子的//apply plugin: 'android-apt'二、修...原创 2018-09-17 16:06:27 · 156 阅读 · 0 评论 -
Android Studio 升级到3.0后出现编译错误Error:Cannot choose between the following configurations of project
前段时间将Android Studio 升级到3.0后,原本一切正常的项目出现编译错误Error:Cannot choose between the following configurations of project :**: - debugApiElements - debugRuntimeElements - releaseApiElements - releaseRuntim...原创 2018-09-17 16:03:32 · 458 阅读 · 0 评论 -
You need to use a Theme.AppCompat theme (or descendant) with this activity.
错误描述为:java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.起因:我想在Manifest中设置我的activity全屏,代码如下: <activity android:name=".MainAct...原创 2018-09-04 16:01:45 · 828 阅读 · 0 评论 -
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get m
今天遇到一个奇葩的问题,蛋疼了半天,怎么搞都搞不定,哎,那个无奈啊!好吧,我用的是下面的1方法定位到了自己的错误1、一般出现这个错误是自己当前新加的项目问题,可以尝试选择自己当前项目,选择 Build - > Make Mode '当前所选项目' ,如果是这里的问题,也会有详细提示给你参考! 2、打开Termianl ,输入命令 gradlew compileDebug --...原创 2018-07-24 18:35:45 · 1636 阅读 · 0 评论 -
AnimatedVectorDrawableCompat适配5.0以下安卓
*首先 VectorDrawableCompat依赖与AAPT的一些功能,它能保持最近矢量图使用的添加的属性ID,以便他们可以被v21之前的引用。如果你没有启用这个标志,当你在KitKat上运行你的APP你会看到以下(或者类似)错误: 解决办法:启用标志位 如果你正在用Gradle插件v2.0或者更高,我有一个简洁方法去启用它:android { defaul...原创 2018-07-24 01:29:26 · 792 阅读 · 0 评论 -
Error while generating the main dex list
jar 包冲突我的遇到这个的原因是因为v7包 包含v4 所以把v7去掉就解决了原创 2018-07-23 09:36:28 · 1435 阅读 · 0 评论 -
解决rg.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed
错误提示:rg.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failedCompilation failed; see the compiler error output for details. 解决过程terminal 输入gradlew compileDeb...原创 2018-07-21 18:33:28 · 1514 阅读 · 0 评论 -
上传jcenter的坑
第一个坑要注册个人账号 !非公司账号第二个坑:-bash: ./gradlew: Permission denied</div>执行命令的权限不够,先执行如下命令赋予权限:chmod +x gradlew 回车执行后,再执行上传jcenter命令就可以了。 第三个坑:Execution failed for task ':core:lint'.Exe...原创 2018-07-21 13:28:43 · 342 阅读 · 0 评论 -
成功解决org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed;
升级完Android Stadio 3.1以后将所有的compile变为implementation 后,clean和rebuild都没有发现错误,唯独在run的时候出现了以下错误:Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the...原创 2018-07-19 16:38:01 · 58080 阅读 · 5 评论 -
Android Studio Error:Execution failed for task ':***:compileDebugJavaWithJavac'问题解决办法
此处提供的网址下该版本的jar包尚未发布,所以提示的更新是存在问题的,可以到https://jcenter.bintray.com/com/android/tools/build/gradle/目录下查看最新的gradle插件版本,然后在项目dependencies里修改classpath到目前为止最新的gradle组件版本即可。同时记得修改gradle/wrapper/gradle-wrappe...原创 2018-07-19 15:52:37 · 691 阅读 · 0 评论 -
The SourceSet ‘instrumentTest’ is not recognized by the Android Gradle Plugin.
原因是这里出问题了 instrumentTest.setRoot(‘tests’) ,你可能在升级 Android Studio 时更新了项目的 gradle 配置,这里的配置中 instrumentTest 已被弃用,不适用于现在的 gradle 版本。解决办法用 androidTest 替换 instrumentTest,编译运行即可。...原创 2018-07-19 15:48:15 · 330 阅读 · 0 评论 -
unable to resolve dependency for cordovalib
今天突然想起以前弄过的Cordova,于是便下来重新玩玩,一开始Android Studio还没更新,一切正常。然而当我选择确定更新为3.0并同时更新了gradle后,项目竟然开始报错unable to resolve dependency for cordovalib...打开build.gradle看了后其中dependencies是这样写的 dependencies {...原创 2018-07-19 15:47:03 · 217 阅读 · 0 评论 -
Mr.Smile填坑记——AndroidStudio3.0 Canary 8注解报错Annotation processors must be explicitly declared now.
体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错Error:Execution failed for task ':app:javaPreCompileDebug'.> Annotation processors must be explicitly declared now. The followi...原创 2018-07-12 16:21:38 · 165 阅读 · 0 评论 -
No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.
最近从GitHub上down下来一个项目,却在导入到AS的时候一直报Error:No service of type Factory<LoggingManagerInternal> available in ProjectScopeServices.这个错误clean一下项目之后,报出了详细错误信息接下来仔细看异常信息,Could not create plugin of type '...原创 2018-07-12 16:17:47 · 326 阅读 · 0 评论 -
Android Studio NDK开发 Execution failed for task ':xxxx项目:transformNativeLibsWithStripDebugSymbol
错误信息:FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':xxxx项目名称:transformNativeLibsWithStripDebugSymbolForDebug'.> A problem occurred starting process 'command '...原创 2018-07-12 10:30:58 · 227 阅读 · 0 评论 -
android-解决 Android N 上 报错:android.os.FileUriExposedException
我们使用手机的时候经常会看到应用程序提示升级,大部分应用内部都需要实现升级提醒和应用程序文件(APK文件)下载。一般写法都差不多,比如在启动app的时候,通过api接口获得服务器最新的版本号,然后和本地的版本号比较,来判断是否需要弹出提示框下载,当然也可以通过推送的自定义消息来实现。我们这里主要讨论的是应用程序下载,并在通知栏提醒下载完成。实现过程大致分为三步:创建一个service在servi...原创 2018-07-07 14:11:39 · 476 阅读 · 0 评论 -
Failed to resolve: common Open File 导入项目问题
Failed to resolve: common Open File Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.It will be removed at the end of 2018. For more information see: h...原创 2018-07-05 19:52:00 · 598 阅读 · 2 评论 -
Could not find com.android.tools.lint:lint-gradle:26.1.1
打包出现错误。解决方法在app的build.gradle 的android 节点下加上 lintOptions { checkReleaseBuilds false abortOnError false }原创 2018-06-29 16:02:15 · 2860 阅读 · 2 评论