Search code examples
androidnativescriptangular-nativescript

As soon as I install nativescript-ui-listview it crashes with classnotfoundException


I am using nativescript and as soon I install the listview plugin it crashes

If I run

tns run android

It compiles and run in the emulator.

I close the run with CONTROL+C

Then I install nativescript ui listview with:

tns plugin add nativescript-ui-listview

And after it installs and I try to run again with:

tns run android

I get this error:

Exception in thread "main" java.lang.ClassNotFoundException: Class: com.telerik.widget.list.RadListView.ItemClickListener at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:776) at org.nativescript.staticbindinggenerator.Generator.collectInterfaceMethods(Generator.java:703) at org.nativescript.staticbindinggenerator.Generator.getPublicApi(Generator.java:227) at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:342) at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:133) at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:172) at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:90) at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:66) at org.nativescript.staticbindinggenerator.Main.main(Main.java:47)

I have been looking around and I did not find any related issue.

It happen even before any import inside the app.


Solution

  • just to point out that after encountering the same problem, I just removed the android platform with tns platform clean android and it worked, it is not necessary to remove the node_modules folder.

    Hope it helps the next ones to find this bug :)