PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

Not found for element "Nativescript-drop-down:DropDown" #39

Closed jeyachanthuruj closed 8 years ago

jeyachanthuruj commented 8 years ago

Hi, why i get this issue? (Only i get on ios build)

Oct 10 08:24:33 MacBook-Pro arvixstay[60076]: [] *nw_connection_get_connected_socket_block_invoke 2 Connection has no connected handler Oct 10 08:24:33 MacBook-Pro arvixstay[60076]: PAC stream failed with Oct 10 08:24:33 MacBook-Pro arvixstay[60076]: [] nw_proxy_resolver_create_parsed_array PAC evaluation error: kCFErrorDomainCFNetwork: 2 Oct 10 08:24:43 MacBook-Pro arvixstay[60076]: [] __nw_connection_get_connected_socket_block_invoke 4 Connection has no connected handler Oct 10 08:24:43 MacBook-Pro arvixstay[60076]: PAC stream failed with Oct 10 08:24:43 MacBook-Pro arvixstay[60076]: [] nw_proxy_resolver_create_parsed_array PAC evaluation error: kCFErrorDomainCFNetwork: 2 Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 1 0x1030f6379 NativeScript::FFICallbackNativeScript::ObjCMethodCallback::ffiClosureCallback(fficif, void_, void, void) Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 2 0x10376351e ffi_closure_unix64_inner Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 3 0x103763ed2 ffi_closure_unix64 Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 4 0x104803028 _UIGestureRecognizerSendTargetActions Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 5 0x104800af7 _UIGestureRecognizerSendActions Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 6 0x1047ffd83 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 7 0x1047ebe56 _UIGestureEnvironmentUpdate Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 8 0x1047eb89b -[UIGestureEnvironment _deliverEvent:toGestureRecognizers:usingBlock:] Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 9 0x1047eaa7e -[UIGestureEnvironment _updateGesturesForEvent:window:] Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 10 0x1043297ad -[UIWindow sendEvent:] Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 11 0x1042d6a33 -[UIApplication sendEvent:] Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 12 0x104ac8b6d dispatchPreprocessedEventFromEventQueue Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 13 0x104ac1817 handleEventQueue Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 14 0x106a3d311 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION** Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 15 0x106a2259c CFRunLoopDoSources0 Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 16 0x106a21a86 __CFRunLoopRun Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 17 0x106a21494 CFRunLoopRunSpecific Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 18 0x1099dea6f GSEventRunModal Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 19 0x1042b8f34 UIApplicationMain Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 20 0x103763d2d ffi_call_unix64 Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: 21 0x1107b7350 Oct 10 08:25:18 MacBook-Pro arvixstay[60076]: file:///app/tns_modules/ui/builder/builder.js:162:56: JS ERROR Error: Building UI from XML. @file:///app/views/lodging/create/lodging-reservations.xml:31:17 ↳Module '/Users/jeyachanthurujeyarathnam/Library/Developer/CoreSimulator/Devices/BF5311BD-42C8-4F22-98E5-8EB9EEB72577/data/Containers/Bundle/Application/D9000631-89A1-41EE-BA07-BE1883CBDA3D/arvixstay.app/app/tns_modules/nativescript-drop-down' not found for element 'nativescript-drop-down:DropDown'. ↳UIScreen.mainScreen is not a function. (In 'UIScreen.mainScreen()', 'UIScreen.mainScreen' is an instance of UIScreen) Oct 10 08:25:18 MacBook-Pro com.apple.CoreSimulator.SimDevice.BF5311BD-42C8-4F22-98E5-8EB9EEB72577.launchd_sim58588: Service exited due to Segmentation fault: 11

jeyachanthuruj commented 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'.

PeterStaev commented 8 years ago

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.

jeyachanthuruj commented 8 years ago

@PeterStaev Thank you so much. It's works fine :) I fixed both issue as you explained. Thanks again.

miaupip commented 7 years ago

@PeterStaev Thank you so much for your help!

An3aClo commented 6 years ago

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
PeterStaev commented 6 years ago

@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.

An3aClo commented 6 years ago

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.

PeterStaev commented 6 years ago

@An3aClo , everything you need to know is written in the readme in the section usage: https://github.com/PeterStaev/NativeScript-Drop-Down#usage 😉

An3aClo commented 6 years ago

@PeterStaev Thank you very much will definitely help.