Skip to content

Android: Could not find method getVersionOrDefault() for arguments [AsyncStorage_kotlinVersion, 1.5.31] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler. #705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 5 tasks
todor-a opened this issue Nov 4, 2021 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@todor-a
Copy link

todor-a commented Nov 4, 2021

What happened?

I expected to be able to install the package and use it. Instead, the app fails to start.

Version

1.15.10

What platforms are you seeing this issue on?

  • Android
  • iOS
  • macOS
  • Windows
  • web

System Information

System:
    OS: Windows 10 10.0.19043
    CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
    Memory: 4.98 GB / 15.81 GB
  Binaries:
    Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 7.24.1 - 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.7621141
    Visual Studio: Not Found
  Languages:
    Java: Not Found
    Python: 3.9.2 - C:\Python39\python.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.63.4 => 0.63.4
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to Reproduce

  1. Install the package.
  2. run react-native link @react-native-async-storage/async-storage
  3. run react-native start-android
  4. An error appears:
FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\todor\Projects\umamai\lafayette-mobile-react\node_modules\@react-native-async-storage\async-storage\android\build.gradle' line: 40

* What went wrong:
A problem occurred evaluating project ':@react-native-async-storage_async-storage'.
> Could not find method getVersionOrDefault() for arguments [AsyncStorage_kotlinVersion, 1.5.31] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler.

P.S. I see that this line was changed 2 hours ago: fc34bfa

@todor-a todor-a added the bug Something isn't working label Nov 4, 2021
@cjshearer
Copy link

cjshearer commented Nov 4, 2021

same here EDIT:

Just npm install @react-native-async-storage/[email protected] for now.

@todor-a
Copy link
Author

todor-a commented Nov 4, 2021

I can confirm that 1.15.9 works correctly.

@carlosq-ordering
Copy link

I can confirm that 1.15.9 works correctly.

@krizzu
Copy link
Member

krizzu commented Nov 4, 2021

Hey, sorry for the issue - did not have it in our example app, when I released new version. The fix is coming up #706

@krizzu krizzu self-assigned this Nov 4, 2021
@vguille
Copy link

vguille commented Nov 4, 2021

same here EDIT:

Just npm install @react-native-async-storage/[email protected] for now.

Worked for me, thx :)

@krizzu
Copy link
Member

krizzu commented Nov 5, 2021

Fixed in v1.15.11

@krizzu krizzu closed this as completed Nov 5, 2021
@Daavidaviid
Copy link

For M1 macs,

in android/build.gradle :

buildscript {
    …
    ext {
        …
        AsyncStorage_next_roomVersion = "2.4.0-alpha03"
    }
}

@maazshaikh1711
Copy link

For M1 macs,

in android/build.gradle :

buildscript {
    …
    ext {
        …
        AsyncStorage_next_roomVersion = "2.4.0-alpha03"
    }
}

Hey Daavidaviid, I'm still getting the issue. Even after writing this line of code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants