You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React-Native版BlinkID许可密钥报错及Android包名配置咨询

BlinkID Android端包名配置说明

1. 核心匹配规则

你申请Android端许可密钥时在Microblink开发者后台填写的包名,必须和项目实际配置的应用ID完全一致,大小写、字符都不能有偏差,否则就会触发许可校验错误。

2. 项目内包名(应用ID)配置位置

打开RN项目下的android/app/build.gradle文件,找到defaultConfig代码块,其中applicationId字段就是需要匹配的包名配置:

android {
    namespace "com.yourcompany.yourappname"
    defaultConfig {
        // 该值必须与你申请Android许可时提交的包名完全相同
        applicationId "com.yourcompany.yourappname"
        minSdkVersion 21
        targetSdkVersion 33
        versionCode 1
        versionName "1.0"
    }
}

3. 许可密钥配置校验

你当前的许可配置代码如下,注释已经明确标注了Android许可密钥是和对应applicationId绑定的,调整完包名后如果还是报错,需要确认你填入的Android许可密钥,确实是Microblink后台针对对应包名签发的密钥:

const licenseKey = Platform.select({
    // iOS license key for applicationID: com.microblink.sample ----> instead of IDScanning
    ios: 'here is ios License key',
    // android license key for applicationID: com.microblink.sample ----> instead of IDScanning
    android: 'here is android License key'
})

参考截图

配置截图
报错截图

内容的提问来源于stack exchange,提问作者Imdadul Haque

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.03 13:54:05