如何解决A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7d400300 in tid 27503 when 添加mircroblink license file
所以我有一个包含 microblink 库的项目,我需要在 MainActivity 中声明它,这里是它的样子
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
/** Set the License from the file*/
MicroblinkSDK.setLicenseFile("this is my license file",this);
}
然后我运行程序并收到错误致命信号,但是当我从 microblink 中删除声明代码时,它可以照常工作。我试过搜索解决方案,它说要添加这个
android:hardwareAccelerated="false"
在清单文件中但失败并且错误没有改变。一些帮助会非常好!
这里是调试日志
I/art: Do partial code cache collection,code=26KB,data=29KB
I/art: After code cache collection,code=25KB,data=29KB
Increasing code cache capacity to 128KB
I/art: Compiler allocated 6MB to compile void android.widget.TextView.<init>(android.content.Context,android.util.AttributeSet,int,int)
I/art: Do partial code cache collection,code=61KB,data=53KB
After code cache collection,data=53KB
Increasing code cache capacity to 256KB
D/line:110: --- Implementation #2 with key 0x52
D/line:37: Unlocking BlinkID native library version 4.7.0
A/libc: Fatal signal 11 (SIGSEGV),code 1,fault addr 0x7d400300 in tid 25983 (ana.wandaflpdev)
Disconnected from the target VM,address: 'localhost:50648',transport: 'socket'
解决方法
首先,从日志中可以看出您使用的是4.7版本,这是2019年2月发布的旧版本BlinkID。 我建议尝试实现最新版本 (5.9),您可以在此处下载: https://github.com/BlinkID/blinkid-android/releases/tag/v5.9.0
此外,关于许可证密钥方法,建议以扩展 Android Application class
并在 onCreate callback
中设置许可证的方式实现它,如下所示:
public class MyApplication extends Application {
@Override
public void onCreate() {
MicroblinkSDK.setLicenseFile("path/to/license/file/within/assets/dir",this);
}
}
更多细节在这里: https://github.com/BlinkID/blinkid-android#performing-your-first-scan
如果这有帮助,请告诉我。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。