-
-
Notifications
You must be signed in to change notification settings - Fork 969
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
Cannot invoke method toInteger() on null object #2310
Comments
u r missing one of the variables below in ur build.gradle
and btw u shouldnt default any of them to 0 |
but u absolutely should have all of that in ur build.gradle |
As I mentioned, I am using React-Native in an Android project and not the other way around, so most of build.gradle files that I have here for internal libraries and the app itself mentions only Edit: My mistake, the project do have the buildscript ext, but no minSdkVersion was specified, I added and the sync still fails |
i dont think u should have different libraries compiling with different sdk
versions so the best practice imo would be setting these vars to the sdk
versiosn ur currently using. but realistically nobody use this library
attaching to a native app. so it hasnt been a problem.
i mean ur welcome to pr but i dont see much benefit
…On Fri, May 10, 2024, 1:59 PM Gian Carlo Mantuan ***@***.***> wrote:
but u absolutely should have all of that in ur build.gradle they are in
the rn-cli example template unless u deliberately delete them
https://github.com/facebook/react-native/blob/1db50a37d66b9a873d6e3341a3e3af153b28a242/packages/react-native/template/android/build.gradle#L4
As I mentioned, I am using React-Native in an Android project and not the
other way around, so most of build.gradle files that I have here for
internal libraries and the app itself mentions only minSdk I am not using
the react.ext buildscript
—
Reply to this email directly, view it on GitHub
<#2310 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZMOVVT4S45V2LXTNALL4YTZBUYK3AVCNFSM6AAAAABHRBV7W2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGI3DGOBYGI>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Describe the Bug
I run an integrated react native instance on an Android app, I added this library to the project and when I try to sync the Android Project the gradle gives an error saying:
The function in particular is:
I did a little bit of hacking and could make the project to sync by adding a default value as the toInteger() function was expecting something:
Although this doesn't feel right, is there a property that i need to set in my android project that would pass this check easily?
Steps To Reproduce
How can someone else reproduce this bug?
Create an Android Project and manually integrate React-Native to it.
After this you can add this library into React-Native Project and expose the
node_modules
to the Android project with the dependency and try to build it.I've added the library into my
react-native.config.js
as manually linking the library but the error still persistEnvironment Info:
A dump of
npx react-native info
:Library version:
"react-native-track-player": "^4.1.1",
The text was updated successfully, but these errors were encountered: