Unresolved reference 'RNUMConfigure'
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)
}
