项目名称减少了几个字母,编译通过。在stackoverflow找到的答案。
Error:com.android.builder.internal.aapt.AaptException: Failed to crunch file ...
Attempt to invoke virtual method int android.view.View.getImportantForAccessibility() on a null object reference
参考
Android Studio出现Error:No service of type Factory available in ProjectScopeServices.
项目中的library被作者发布到了maven中,android-maven-gradle-plugin
版本号不同会有引起这个bug.
参考:
Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try d
Error running app: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run (or updating either the IDE or the Gradle plugin to the latest version)
instants run引起的
2016-12-3
参考:
解决Android-studio假死机建议
AS点任何地方都没有反应,最后在任务管理器关闭AS,再打开,过了一会又无法编辑,不是gradle的原因。
今天遇到了AS假死,就是卡住了,不是gradle的原因,后来上网发现是杀毒软件的原因。pc是win10,开启360免费wifi有时开启成功,有时开启失败,今天是开启失败导致AS卡住了。
任务管理器–>性能–>资源管理器–>内存 关闭360wifi即可。
当我们使用AS,点击Import an Android code sample的时候
会出现错误:下图
Step1 软件:GreenVPN
Step2:setting
ERROR LOG;:
log挺长的,只有最后一句有用
Directories=[/data/app/com.paireach.scmc-2/lib/arm64, /vendor/lib64, /system/lib64, /vendor/lib64, /system/lib64]]] couldn't find "libiconv.so"
找不到libiconv.so
但是我jniLibs里面有libiconv.so
,再看前面arm64,我在build.gradle中设置支持的SO库架构,包含arm64,而我却没有arm64文件夹及里面.so文件,所以报错。
defaultConfig {
applicationId "com.paireach.scmc"
minSdkVersion 16
targetSdkVersion 22
versionCode 2
versionName "1.0"
ndk {
//设置支持的SO库架构
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'//, 'x86_64', 'x86'
}
}
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader
[DexPathList[[dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-zxing_56137a15f339b1b19150cd1c9777b3308c1fa3dd-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-xUtils-2.6.14_9d15844c8a4e8bbb6a59031858117e79be71d282-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_8-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_7-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_6-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_3-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_2-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_1-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-slice_0-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-locSDK_6.23_5202e866fb872b5aa96f9432e35a6a74a8005678-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-internal_impl-24.1.1_a3ebd4ead5c2e7bb9b7a53ecde65aa65dafb19fc-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-gson-2.7_2e85dbf641c4a16c73925139bd4ff50ebb0450dd-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-fastjson-1.2.17_00d7c8f29620068a19b9dbb5104044de57b732a4-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-eventbus-3.0.0_338198e230e883acd6c9c82ca46ba5fc3096755c-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-classes_ea77a6448204904112250a31e98aaedb9ad13dd2-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-classes_e0e28d909cd3d29d2668e8f99db8f16e22326412-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-classes_cbb2fb03568fea510a2f65636861e7073eaa75f7-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-classes_ae04cb2b6e51bed601145925c0423449bacc9517-classes.dex",
dex file "/data/data/com.paireach.scmc/files/instant-run/dex/slice-classes_93b2a742c96164bc0cde1b7c62b2537322e1383e-classes.dex",
/vendor/lib64, /system/lib64, /vendor/lib64,/system/lib64]]] couldn't find "libiconv.so"
216-12-17,今天在用fragment的时候遇到这这个bug,自己反复检查发现这是第一次commit,怎么会报这个bug呢,不应该呀,但是既然报了这个错,按钮找吧,30分钟过去了,一点头绪没有,FragmentTransaction / FragmentManager
都没错,都是新创建的,不会第二次commit的时候还用上次的FragmentTransaction
。最后突然发现,我在用switch
的时候,其中一个case
下面删掉了break
,而几个case中都调用了transaction.replace(...).commit()
,这样就导致第二次commit。
错误message
Error:Execution failed for task ':app:packageRelease'.
> com.android.ide.common.signing.KeytoolException: Failed to read key scmc from store "D:\app数字证书\app数字证书\
> SCMC\scmckeystore.jks": Cannot recover key
原因:
解决方法:http://stackoverflow.com/questions/32718820/failed-to-resolve-com-github-philjaympandroidchartv2-1-4
方法:
降低编译的版本号:
compileSdkVersion 25
或者把module中的build.gradle换掉
应该是AS编译的问题,点击AS的Build–>clean Project +Rebuild Porject,如果还不行,重启手机+AS+笔记本