-
-
Notifications
You must be signed in to change notification settings - Fork 10
error NotificationIntentService has no zero argument constructor #2
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
Comments
@andrew19881123 @slavchev I m having the same problem and cannot move passed. Pls help!! |
With version 2.2.0 of the android runtime you can open the generated Take a look at https://github.com/NativeScript/sample-android-background-services/blob/master/platforms/android/src/main/java/com/tns/notifications/NotificationIntentService.java I left it there purposely for visibility |
@Pip3r4o Yes I see it there. But the problem is my edited code gets overwritten when
|
@WinMinTun regarding 1) - the lack of empty constructor is JVM's fault, but we normally rewrite generated classes. You may have to disable the binding generator after having generated the java class and editing it. To do that - open |
@Pip3r4o Thanks a lot for the details. It works now for 2.2. |
Any solution for this on 2.3+ ? |
i am having the same problem. I also noticed that this sample project has a few extra files that my project does not have. platforms/android/src/main/java/com/tns/broadcastreceivers did you manually add these files? I downloaded the code from this repository, and it works fine, but if I remove platforms then i get the no zero argument constructor error, so i think there is something i am not being told here. |
Project was cleaned up, and a fix applied in the form of a plugin. Feel free to test out the updated sample, and let me know how it works for you. Thanks! |
Today I am running the project for background services Https://github.com/NativeScript/sample-android-background-services But still throwing the same error, is there something that should be done to clone the project to take the changes that made the project to stop displaying the error message? |
@pacear10 From a freshly cloned project, it should be as simple as adding the android platform and running the project, the necessary dependencies should be downloaded, installed, then you'll be good to go. |
Thanks for replying, clone the project, install the android platform, the app starts, but when the button is pressed the error still appears. |
@pacear10 just cloned it (master branch), did |
@Pip3r4o is it possible to generate Java code with 2.5.0 runtime? if not, how can I tell {N} explicitly to use 2.2.0 runtime? |
@sam0829 version 3.0 will bring back generated Java code, if you wish to use a specific runtime, you can install it with |
I saw the note on the nativescript blog
but how do I solve the problem to make this app works?
The text was updated successfully, but these errors were encountered: