Skip to content

After upgrading react native project to use Kotlin @react-native-community/async-storage still continue to search MainApplication.java file #673

Description

@RozumSystems

I've have changed project to use kotlin using this doc - https://levelup.gitconnected.com/powering-react-native-with-kotlin-swift-support-e5c1210a4e25

after running command to link it still looks for .java file

Z:....\AlarmMobile>react-native link @react-native-community/async-storage
warn Calling react-native link [packageName] is deprecated in favor of autolinking. It will be removed in the next major release.
Autolinking documentation: https://github.com/react-native-community/cli/blob/master/docs/autolinking.md
(node:14176) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
info iOS module "@react-native-community/async-storage" is already linked
info Linking "@react-native-community/async-storage" Android dependency
error Linking "@react-native-community/async-storage" failed.
Error: ENOENT: no such file or directory, open 'Z:...\android\app\src\main\java\com\alarmmobile\MainApplication.java'
at Object.openSync (fs.js:498:3)
at Object.readFileSync (fs.js:394:35)
at applyPatch (Z:...\node_modules@react-native-community\cli-platform-android\build\link\patches\applyPatch.js:42:51)
at Object.registerNativeAndroidModule [as register] (Z:...\node_modules@react-native-community\cli-platform-android\build\link\regi
sterNativeModule.js:34:27)
at Z:...\node_modules\react-native\node_modules@react-native-community\cli\build\commands\link\linkDependency.js:63:16
at Array.forEach ()
at linkDependency (Z:...\node_modules\react-native\node_modules@react-native-community\cli\build\commands\link\linkDependency.js:36
:32)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.link [as func] (Z:...\node_modules\react-native\node_modules@react-native-community\cli\build\commands\link\link.js
:110:5)
at async Command.handleAction (Z:...\node_modules\react-native\node_modules@react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.

Environment

  • Platforms tested:

    • [ V ] Android
    • iOS
    • macOS
    • Windows
  • AsyncStorage version:

  • "@react-native-async-storage/async-storage": "^1.15.8",
    
  • Environment:
    npx react-native info
    info Fetching system and libraries information...
    System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz
    Memory: 2.13 GB / 15.88 GB
    Binaries:
    Node: 14.17.6 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
    SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
    IDEs:
    Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7678000
    Visual Studio: 16.11.31624.102 (Visual Studio Community�2019)
    Languages:
    Java: Not Found
    npmPackages:
    @react-native-community/cli: Not Found
    react: ^16.13.1 => 16.13.1
    react-native: ^0.64.0 => 0.64.0
    react-native-windows: Not Found
    npmGlobalPackages:
    react-native: Not Found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions