Android 日志错误收集
记录错误 避免长时间忘记
1. Fatal signal 11 (SIGSEGV), code 2, fault addr 0x7f674fb000 in tid -8665652 (
高并发下使用context 导致的 具体原因不明白
解决办法 使用context的方法 加 synchronized
```
public synchronized static byte[] drawable2Byte(Context context, int tile_2) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Bitmap bitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.tile_2);
bitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);
byte data[] =baos.toByteArray();
bitmap.recycle();
try {
if (baos != null)
baos.close();
} catch (IOException e) {
e.printStackTrace();
}
return data;
}
```
2. Android 错误无法debug 运行
Cannot debug application xx.xxx.xxx.app on device huawei-huawei_g7_tl00.
This application does not have the debuggable attribute enabled in its manifest.
If you have manually set it in the manifest, then remove it and let the IDE automatically assign it.
If you are using Gradle, make sure that your current variant is debuggable.
3. Instant Run requires ‘Tools | Android | Enable ADB integration’ to be enabled.
错误: Instant Run requires ‘Tools | Android | Enable ADB integration’ to be enabled.
4. Android studio 无法更新代码 AssertionError: null
android studio 在更新SVN 出现
AssertionError: null
在文件目录下 更新代码出现
Error: Please execute the ‘Cleanup’ command.
只要在 Cleanup 下 就可以更新了
5. Android 错误Error:Execution failed for task ‘:app:preDexDebug’.
Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_60\bin\java.exe'' finished with non-zero exit value 1
原因
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}}
``` 这个问题有很多问题导致的 有可能重启下studio 就好了
<div class="se-preview-section-delimiter"></div>
####6. Process 'command 'G:\android-sdk-windows\build-tools\20.0.0\aapt.exe'' finished with non-zero exit v
1. 暂时发现targetSdkVersion 要和supoport 相同 就是supoport 版本 不能高于 targetSdkVersion
2. 查找是否有包冲突
3. 在build.gradle 中 android 字段里添加
<div class="se-preview-section-delimiter"></div>
dexOptions {
javaMaxHeapSize “4g”
preDexLibraries = false
}
“`
- did you try to to “Build”-> “Clean Project” and then go to “Build” -> “Rebuild Project”
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
- did you try to to “Build”-> “Clean Project” and then go to “Build” -> “Rebuild Project”
7.Android Studio升级3.1.2
org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not HEAD ‘https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom‘. Received status code 405 from server: Method Not Allowed
删除.gradle 文件夹
推荐阅读
-
Android获取WebView加载url的请求错误码 【推荐】
-
Android 后台发送邮件示例 (收集应用异常信息+Demo代码)
-
Android 如何收集已发布程序的崩溃信息
-
android 模拟器 访问 localhost IIs Express 400错误
-
Python实现过滤单个Android程序日志脚本分享
-
Docker 搭建 ELK 收集并展示 tomcat 日志
-
android 捕获系统异常并上传日志具体实现
-
WAC启动Android模拟器 transfer error: Read-only file system错误解决方法
-
ASP开发中可能遇到的错误信息中文说明大全(整理收集)第1/2页
-
实现Nginx中使用PHP-FPM时记录PHP错误日志的配置方法