|
/

Unresolved reference 'RNUMConfigure'

Yy****************35
发布于 1 年前
11215来自广东省
移动统计 U-App
SDK集成与升级

ReactNative Android 构建时报错:Unresolved reference 'RNUMConfigure'

按照官方提供的自动集成SDK方案实施:

buildscript {
repositories {
google()
jcenter()
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://repo1.maven.org/maven2/' }
}
}

dependencies {
implementation fileTree(include:['*.jar'], dir:'libs')
//友盟基础库
implementation 'com.umeng.umsdk:common:+'//必选
implementation 'com.umeng.umsdk:asms:+'//必选
}

override fun onCreate() {
super.onCreate()
    SoLoader.init(this, OpenSourceMergedSoMapping)

//设置LOG开关,默认为false
    UMConfigure.setLogEnabled(true);

//友盟预初始化
    UMConfigure.preInit(this,"私密","Umeng");
//
    RNUMConfigure.init(this, "私密", "Umeng", UMConfigure.DEVICE_TYPE_PHONE, "")

if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
    }
    ApplicationLifecycleDispatcher.onApplicationCreate(this)
  }

1个回答
 
1 年前
来自浙江省

您好,出现“Unresolved reference 'RNUMConfigure'”的错误可能是因为在代码中引用了未正确导入或未定义的类。请检查以下几点:

  1. 确保您已正确集成友盟相关SDK,并按照官方文档完成配置。
  2. 检查您的项目是否已正确导入友盟相关的依赖库。
  3. 如果您使用的是React Native,请确保已正确链接原生模块。
Loading ...
登录社区,分享你的经验