首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >A/libc:添加mircroblink许可证文件时,tid 27503中的致命信号11 (SIGSEGV),代码1,故障地址0x7d400300

A/libc:添加mircroblink许可证文件时,tid 27503中的致命信号11 (SIGSEGV),代码1,故障地址0x7d400300
EN

Stack Overflow用户
提问于 2021-01-13 11:01:22
回答 1查看 173关注 0票数 1

因此,我有一个包含microblink库的项目,我需要在MainActivity中声明它,如下所示

代码语言:javascript
复制
@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中删除声明代码时,它可以正常工作。我试着搜索解决方案,上面写着添加以下内容

代码语言:javascript
复制
android:hardwareAccelerated="false"

在清单文件中,但是失败了,并且错误没有改变。如果能得到一些帮助就太好了!

这是调试日志

代码语言:javascript
复制
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, code=61KB, 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'
EN

回答 1

Stack Overflow用户

发布于 2021-01-14 23:19:41

首先,从日志中可以看到,您使用的是4.7版,这是2019年2月发布的旧版BlinkID。我建议尝试实现最新版本(5.9),您可以在此处下载:https://github.com/BlinkID/blinkid-android/releases/tag/v5.9.0

此外,对于许可证密钥方法,建议以扩展Android Application class并在onCreate callback中设置许可证的方式实现它,如下所示:

代码语言:javascript
复制
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

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65695070

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档