Closed jeyachanthuruj closed 8 years ago
i get this error too. any idea?
node_modules/nativescript-drop-down/drop-down.d.ts(31,14): error TS2304: Cannot find name 'UITextField'.
node_modules/nativescript-drop-down/drop-down.d.ts(32,18): error TS2503: Cannot find namespace 'android'.
Hey @jeyachanthuruj , The first error is related to #34. The relative changes in the {N} core modules that will allow us to fix the error will be present in 2.4, so there will be a new version that supports XCode8 then. In the mean time you can look in the above mentioned GitHub issue for a workaround.
For the second error - those are TS compile errors which can be ignored. If you do not want to see them you must NPM install the tns-platform-declarations
module and add references for the android17.d.ts
and ios.d.ts
files in your project.
@PeterStaev Thank you so much. It's works fine :) I fixed both issue as you explained. Thanks again.
@PeterStaev Thank you so much for your help!
Good day. I'm following the drop-down tutorial on https://www.npmjs.com/package/nativescript-drop-down and when I implement it I get the following error and I do not know what is meant by it any help, please.
An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.playjs/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
Error: Building UI from XML. @file:///app/app-root.xml:1:1
Building UI from XML. @file:///app/home/home-page.xml:9:5 Module '/data/data/org.nativescript.playjs/files/app/nativescript-drop-down' not found for element 'nativescript-drop-down:DropDown'. com.tns.NativeScriptException: Failed to find module: "/data/data/org.nativescript.playjs/files/app/nativescript-drop-down", relative to: app// com.tns.Module.resolvePathHelper(Module.java:146) com.tns.Module.resolvePath(Module.java:55) com.tns.Runtime.callJSMethodNative(Native Method) com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116) com.tns.Runtime.callJSMethodImpl(Runtime.java:996) com.tns.Runtime.callJSMethod(Runtime.java:983) com.tns.Runtime.callJSMethod(Runtime.java:967) com.tns.Runtime.callJSMethod(Runtime.java:959) com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18) android.app.Activity.performCreate(Activity.java:7136) android.app.Activity.performCreate(Activity.java:7127) android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) android.os.Handler.dispatchMessage(Handler.java:106) android.os.Looper.loop(Looper.java:193) android.app.ActivityThread.main(ActivityThread.java:6669) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) File: "file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 244, column: 20
StackTrace: Frame: function:'ScopeError', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 63, column: 24 Frame: function:'SourceError', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 74, column: 23 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 263, column: 17 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 244, column: 33 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13 Frame: function:'EasySAXParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23 Frame: function:'XmlParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22 Frame: function:'XmlStringParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 250, column: 27 Frame: function:'parseInternal', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 212, column: 11 Frame: function:'loadInternal', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 117, column: 27 Frame: function:'loadPage', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 53, column: 27 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 72, column: 12 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 86, column: 20 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 870, column: 50 Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 722, column: 14 Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
Error: Building UI from XML. @file:///app/app-root.xml:1:1
Building UI from XML. @file:///app/home/home-page.xml:9:5 Module '/data/data/org.nativescript.playjs/files/app/nativescript-drop-down' not found for element 'nativescript-drop-down:DropDown'. com.tns.NativeScriptException: Failed to find module: "/data/data/org.nativescript.playjs/files/app/nativescript-drop-down", relative to: app// com.tns.Module.resolvePathHelper(Module.java:146) com.tns.Module.resolvePath(Module.java:55) com.tns.Runtime.callJSMethodNative(Native Method) com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116) com.tns.Runtime.callJSMethodImpl(Runtime.java:996) com.tns.Runtime.callJSMethod(Runtime.java:983) com.tns.Runtime.callJSMethod(Runtime.java:967) com.tns.Runtime.callJSMethod(Runtime.java:959) com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18) android.app.Activity.performCreate(Activity.java:7136) android.app.Activity.performCreate(Activity.java:7127) android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) android.os.Handler.dispatchMessage(Handler.java:106) android.os.Looper.loop(Looper.java:193) android.app.ActivityThread.main(ActivityThread.java:6669) java.lang.reflect.Method.invoke(Native Method) com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) File: "file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 244, column: 20
StackTrace: Frame: function:'ScopeError', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 63, column: 24 Frame: function:'SourceError', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/utils/debug.js', line: 74, column: 23 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 263, column: 17 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 244, column: 33 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 148, column: 13 Frame: function:'EasySAXParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/js-libs/easysax/easysax.js', line: 751, column: 23 Frame: function:'XmlParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/xml/xml.js', line: 195, column: 22 Frame: function:'XmlStringParser.parse', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 250, column: 27 Frame: function:'parseInternal', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 212, column: 11 Frame: function:'loadInternal', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 117, column: 27 Frame: function:'loadPage', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 53, column: 27 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 72, column: 12 Frame: function:'', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 86, column: 20 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 870, column: 50 Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 722, column: 14 Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.playjs/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:996)
at com.tns.Runtime.callJSMethod(Runtime.java:983)
at com.tns.Runtime.callJSMethod(Runtime.java:967)
at com.tns.Runtime.callJSMethod(Runtime.java:959)
at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
... 11 more
@An3aClo , seems the widget is not installed/used properly. make sure you run tns plugin add nativescript-drop-down
in your project and that you have registered it in the XML where it is used.
Thank you for the reply. The plugin is installed but how do I register it in the XML file? This is what I have so far in the .xml file.
@An3aClo , everything you need to know is written in the readme in the section usage: https://github.com/PeterStaev/NativeScript-Drop-Down#usage 😉
@PeterStaev Thank you very much will definitely help.
Hi, why i get this issue? (Only i get on ios build)