Closed nmongiya closed 6 years ago
And once it is failed, can not run tns run android or tns debug android until I remove the platform. It shows the below error. `An uncaught Exception occurred on "main" thread. java.lang.RuntimeException: Unable to start activity ComponentInfo{au.com.freshcomputers.FreshTracker.dev/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
TypeError: Cannot read property 'create' of undefined File: "file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 75, column: 14
StackTrace: Frame: function:'', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 75, column: 15 Frame: function:'FrameBase.navigate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 118, column: 30 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 820, column: 30 Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 679, column: 14 Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/activity.js', line: 20, column: 25
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
TypeError: Cannot read property 'create' of undefined File: "file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/builder/builder.js, line: 75, column: 14
StackTrace: Frame: function:'', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 75, column: 15 Frame: function:'FrameBase.navigate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame-common.js', line: 118, column: 30 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 820, column: 30 Frame: function:'ActivityCallbacksImplementation.onCreate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 679, column: 14 Frame: function:'NativeScriptActivity.onCreate', file:'file:///data/data/au.com.freshcomputers.FreshTracker.dev/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:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
... 9 more
`
I realised that I need to update I need to update my angular and it's dependencies and I have updated to
"@angular/animations": "~6.1.0",
"@angular/common": "~6.1.0",
"@angular/compiler": "~6.1.0",
"@angular/core": "~6.1.0",
"@angular/forms": "~6.1.0",
"@angular/http": "~6.1.0",
"@angular/platform-browser": "~6.1.0",
"@angular/platform-browser-dynamic": "~6.1.0",
"@angular/router": "~6.1.0",
"nativescript-advanced-webview": "^1.2.0",
"nativescript-angular": "^6.1.0",
"nativescript-camera": "^3.2.1",
"nativescript-drawingpad": "^3.0.0",
"nativescript-geolocation": "^4.3.0",
"nativescript-google-maps-sdk": "^2.6.1",
"nativescript-iqkeyboardmanager": "^1.2.0",
"nativescript-loading-indicator": "^2.4.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-autocomplete": "^3.9.0",
"nativescript-ui-dataform": "^3.6.3",
"nativescript-ui-listview": "^3.6.0",
"nativescript-ui-sidedrawer": "^4.3.0",
"nativescript-webview-interface": "^1.4.1",
"reflect-metadata": "~0.1.8",
"rxjs": "~6.1.0",
"rxjs-compat": "~6.1.0",
"tns-core-modules": "^4.2.0",
"tslint": "^5.9.1",
"zone.js": "~0.8.26"
Now I am getting the below exception.
Exception in thread "main" java.io.IOException: File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
File:C:\Trunk\FreshTracker\Mobile\platforms\android\app\src\main\java\com\tns\gen\com\telerik\widget\autocomplete\AutoCompleteAdapter_autocomplete_63_32_AutoCompleteAdapter.java Class:
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:78)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:48)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:runSbg'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 45s
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat failed with exit code 1.
@nmongiya
The nativescript-ui-dataform@3.6.4
has a dependency to nativescript-ui-autocomplete@3.8.0
.
Since you also have nativescript-ui-autocomplete@3.9.0
in your dependencies, you get a duplicate of the autocomplete. Please update your nativescript-ui-dataform
dependency to 3.7.0
or higher, since its dependency of the autocomplete will match yours.
thanks @tgpetrov , it fixed the problem.
"dependencies": { "@angular/animations": "~8.0.1", "@angular/common": "~8.0.1", "@angular/compiler": "^8.0.3", "@angular/core": "^8.0.3", "@angular/forms": "~8.0.1", "@angular/http": "~8.0.0-beta.10", "@angular/platform-browser": "~8.0.1", "@angular/platform-browser-dynamic": "~8.0.1", "@angular/router": "~8.0.1", "nativescript-angular": "~8.0.1", "nativescript-background-http": "3.4.1", "nativescript-camera": "^4.5.0", "nativescript-drop-down": "^5.0.4", "nativescript-keyboard-toolbar": "^1.1.0", "nativescript-mediafilepicker": "^2.0.17", "nativescript-modal-datetimepicker": "^1.2.1", "nativescript-ng-ripple": "^2.0.1", "nativescript-pdf-view": "^2.0.1", "nativescript-phone": "^1.4.1", "nativescript-theme-core": "~1.0.4", "nativescript-ui-listview": "^7.1.0", "nativescript-ui-sidedrawer": "^7.0.3", "nativescript-videoplayer": "^4.2.1", "rxjs": "^6.5.3", "tns-core-modules": "~6.0.0", "zone.js": "^0.9.1" }, "devDependencies": { "@angular-devkit/core": "~8.0.1", "@angular/cli": "~8.0.3", "@angular/compiler-cli": "~8.0.1", "@nativescript/schematics": "~0.7.0", "@ngtools/webpack": "~8.0.3", "nativescript-dev-webpack": "~1.0.0", "node-sass": "^4.12.0", "typescript": "^3.4.5" }
@tgpetrov am getting below error take the picture from the camera this issue was happening after updating my project to nativescript 6.1.2 version ,can you pls help me
Error: cancelled
JS: at Object.callback (file:///node_modules\nativescript-camera\camera.js:177:0) [
ERROR in node_modules/tns-core-modules/ui/styling/gradient.d.ts(7,25): error TS6143: Module '../../css/parser' was resolved to 'C:/Trunk/FreshTracker/Mobile/node_modules/tns-core-modules/css/parser.js', but '--allowJs' is not set.