-
Notifications
You must be signed in to change notification settings - Fork 37
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: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.nfc.Tag.hasTech(int)' on a null object reference #40
Comments
Any progress on this issue? I get the same error. I'm using Nativescript 6.0.2 btw. |
I've got the same problem with Nativescript 6.0.0. |
Interestingly I can't reproduce this.. how do you trigger it exactly? Looking at the stacktrace you could try and guard this line; only run that bit of code if |
…od 'boolean android.nfc.Tag.hasTech(int)' on a null object reference #40
I'm just going to assume the aforementioned issue is the problem on your end, and publish 4.0.2 in a bit. |
So.. I quickly created a new project just to test the writing here (when an empty tag is discovered it should write a string to it). However, I still get this error. |
@Fatfrido Thx for the repo. Indeed, when writing a tag I can reproduce this error. |
…od 'boolean android.nfc.Tag.hasTech(int)' on a null object reference #40
@Fatfrido Should be much better with 4.0.3. |
@EddyVerbruggen thanks for the quick fix mate. You are awesome :D |
@EddyVerbruggen thanks for the fix! |
Hi, when i try to write an nfc tag on android, the following error occurs:
I´m working with the latest version
[Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.nfc.Tag.hasTech(int)' on a null object reference JS: android.nfc.tech.Ndef.get(Ndef.java:146) JS: com.tns.Runtime.callJSMethodNative(Native Method) JS: com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1203) JS: com.tns.Runtime.callJSMethodImpl(Runtime.java:1083) JS: com.tns.Runtime.callJSMethod(Runtime.java:1070) JS: com.tns.Runtime.callJSMethod(Runtime.java:1050) JS: com.tns.Runtime.callJSMethod(Runtime.java:1042) JS: com.tns.gen.org.nativescript.widgets.Async_CompleteCallback.onComplete(Async_CompleteCallback.java:20) JS: org.nativescript.widgets.Async$Http$HttpRequestTask.onPostExecute(Async.java:573) JS: org.nativescript.widgets.Async$Http$1$1.run(Async.java:304) JS: android.os.Handler.handleCallback(Handler.java:789) JS: android.os.Handler.dispatchMessage(Handler.java:98) JS: android.os.Looper.loop(Looper.java:180) JS: android.app.ActivityThread.main(ActivityThread.java:6950) JS: java.lang.reflect.Method.invo...
The text was updated successfully, but these errors were encountered: