You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I met this build error when running pnpm run android:
Execution failed for task ':react-native-fs:compileDebugJavaWithJavac'.
> Could not resolve all files for configuration ':react-native-fs:androidJdkImage'.
I have already added those usage to files but it still show this error.
MainApplication.kt (Yeah Idk why it use Kotlin):
packagecom.audioasistanttestimportandroid.app.Applicationimportcom.facebook.react.PackageListimportcom.facebook.react.ReactApplicationimportcom.facebook.react.ReactHostimportcom.facebook.react.ReactNativeHostimportcom.facebook.react.ReactPackageimportcom.facebook.react.defaults.DefaultNewArchitectureEntryPoint.loadimportcom.facebook.react.defaults.DefaultReactHost.getDefaultReactHostimportcom.facebook.react.defaults.DefaultReactNativeHostimportcom.facebook.react.flipper.ReactNativeFlipperimportcom.facebook.soloader.SoLoaderimportcom.rnfs.RNFSPackage;classMainApplication : Application(), ReactApplication {
overrideval reactNativeHost:ReactNativeHost=object:DefaultReactNativeHost(this) {
overridefungetPackages(): List<ReactPackage> {
returnlistOf(
MainReactPackage(), // <---- add commaRNFSPackage() // <---------- add package
)
}
overridefungetJSMainModuleName(): String="index"overridefungetUseDeveloperSupport(): Boolean=BuildConfig.DEBUGoverrideval isNewArchEnabled:Boolean=BuildConfig.IS_NEW_ARCHITECTURE_ENABLEDoverrideval isHermesEnabled:Boolean=BuildConfig.IS_HERMES_ENABLED
}
overrideval reactHost:ReactHost
get() = getDefaultReactHost(this.applicationContext, reactNativeHost)
overridefunonCreate() {
super.onCreate()
SoLoader.init(this, false)
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ReactNativeFlipper.initializeFlipper(this, reactNativeHost.reactInstanceManager)
}
}
Setting.gradle:
rootProject.name ='AudioRecordTest'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
include ':react-native-fs'
project(':react-native-fs').projectDir =newFile(settingsDir, '../node_modules/react-native-fs/android')
And implementation project(':react-native-fs') to build.gradle, but I still meet this error, how to solve?
The text was updated successfully, but these errors were encountered:
I met this build error when running
pnpm run android
:I have already added those usage to files but it still show this error.
MainApplication.kt (Yeah Idk why it use Kotlin):
Setting.gradle:
And
implementation project(':react-native-fs')
to build.gradle, but I still meet this error, how to solve?The text was updated successfully, but these errors were encountered: