-
Notifications
You must be signed in to change notification settings - Fork 562
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
error: cannot find symbol Assert.assertNotNull("Context can not be null!", mContext #340
Comments
I have a same issue. I found out that if there's test code located in src, it caused this kind of build failure. |
its not true, if you use example above which used 0.5.0-alpha.50 successfully compiled. its more like a gradle setting which is not mentioned in Readme.md Example[] https://github.com/mauron85/react-native-background-geolocation-example/blob/master/package.json |
Oh, I use gradle version 3.2.1 and many other native libraries, so one of them could be a problem. |
I have the same issue too for the same version of the library. |
@scurtoni |
I also experienced this compilation error after updating the following settings in my project build.gradle:
As mentioned above, reverting to 0.5.0-alpha.48 fixes the issue. |
Apparently I made mistake using Assert from junit testing framework. Consider this as a bug. Need to be fixed. But on the other side, using Assert is perfectly fine here. You really don't want to continue when there is missing (null) Context. But it should be assert from standard library, not from junit. |
Just merge @scurtoni 's PR mauron85/background-geolocation-android#25. |
FYI: New version 0.5.0 with fix has been published to npm |
Your Environment
Context
Expected Behavior
App should build succesfullt
Actual Behavior
Not building
Possible Fix
Should use new Convention
Steps to Reproduce
Context
App not builds successfully
Debug logs
The text was updated successfully, but these errors were encountered: