问题1. Error:Could not get unknown property 'apkVariantData' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
解决: 这个是因为Tinker中用到了apkVariantData属性,我们可以将tinker的gradle去除掉。即在app下的build.gradle文件下
//apply from: 'tinkerpatch.gradle'
上面是发现tinker有问题,另外发现GrowingIO也有这个问题,如果用的是gradle plugin3.0.0的话也需要去掉,
问题2. ERROR: Received close_notify during handshake
解决: 暂未解决
问题3. 在使用百度OCR API时, 出现 283506 Load jni so library error
在使用百度OCR API Android SDK 时,出现该错误
参考 文字识别-错误码表-百度智能云 https://cloud.baidu.com/doc/OCR/OCR-Android-SDK/24.5C.E9.94.99.E8.AF.AF.E7.A0.81.E8.A1.A8.html#.E9.94.99.E8.AF.AF.E7.A0.81.E8.A1.A8
解决:检查app 目录下的build.gradle文件,在android-->defaultConfig 节点下,是否存在ndk属性, 该属性配置是否正确,
正确配置如下图:
如果配置正确,该问题即得到解决.
问题4: 在AndroidStudio 多次遇到此问题
Install failed.
Installation failed
Rerun
解决: 有一种原因: 手机内存空间小,需卸载app, 不是清理哪些文件的问题, 是必须卸载app !!
通常在手机,占内存最大就是微信,QQ, 我查看了我的手机上QQ占了1.5G, 微信占了3.6G, 这可是手机,不是PC,
果断卸载了QQ, 重装。
在使用 TinkerPatcher 工具时, 遇到一个经常出现问题
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:javaPreCompileRelease'.
> 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 configuration.
- tinker-android-anno-1.7.7.jar (com.tencent.tinker:tinker-android-anno:1.7.7)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.
Note that this option is deprecated and will be removed in the future.
在app目录下的build.gradle文件里, 在 dependencies {} 里面增加
annotationProcessor group: 'com.tencent.tinker', name: 'tinker-android-anno', version: '1.7.7'
在安装 D:\Arcsoft_AllProject\Arcsoft_IdCardVeriDemo_20190821\app\build\outputs\apk\debug 目录下的apk时
报错: Failure [INSTALL_FAILED_OLDER_SDK]
分析: 当前设备的Android版本过低,apk不支持
在Manifest文件中添加如下语句:
或者修改build.gradle文件:
defaultConfig {
applicationId "com.example.XXX.XXXX"
minSdkVersion 17
targetSdkVersion 25
......
}