Closed rohit-32 closed 3 years ago
I am using react-native-v8 with v8-android-nointl and I was getting the same error when I upgraded react-native-v8 to 0.64.0-patch.0 and left v8-android-nointl@8.84.0. Upgrading v8-android-nointl to latest 9.88.0 version fixed the issue. So probably there is some mismatch in react-native-v8 and v8-android versions in your case too.
the react-native-v8
version should map to v8-android-*
version. i've updated the README for the full version mappings.
Hello I followed your instruction but i keep getting error
Exception in HostFunction: Value is an object, expected a number global.nativeLoggingHook(str,log.Level) while running the app
my app/gradle file
` apply plugin: "com.android.application" apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
import com.android.build.OutputFile
project.ext.react = [ enableHermes: false, // clean and rebuild if changing ]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false
def enableHermes = project.ext.react.get("enableHermes", false);
android { compileSdkVersion rootProject.ext.compileSdkVersion
}
dependencies { def billing_version = "3.0.0"
// if (enableHermes) { // def hermesPath = "../../node_modules/hermes-engine/android/"; // debugImplementation files(hermesPath + "hermes-debug.aar") // releaseStagingImplementation files(hermesPath + "hermes-release.aar") // releaseImplementation files(hermesPath + "hermes-release.aar") // } else { // implementation jscFlavor // } implementation "androidx.core:core-ktx:+" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.3' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.android.support:multidex:2.0.1' implementation "com.android.billingclient:billing-ktx:$billing_version"
}
// Run this once to be able to run the application with BUCK // puts all compile dependencies into folder libs for BUCK to use task copyDownloadableDepsToLibs(type: Copy) { from configurations.compile into 'libs' }
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) repositories { maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } mavenCentral() }
`
my app/android/gradle file
` // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript { ext.kotlin_version = '1.4.0-rc' ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 } repositories { google() jcenter() maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' } } dependencies { classpath("com.android.tools.build:gradle:3.5.3") classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
allprojects { repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native-v8/dist") } maven { // prebuilt libv8android.so url("$rootDir/../node_modules/v8-android-jit-nointl/dist") }
} `
Can you help with what i am doing wrong