Nativescript Vue RadSideDrawer undefined - nativescript

I try to create start RadSideDrawer example https://play.nativescript.org/?template=play-vue&id=AZnAQ0
It works well with playground, but when I build it with
tns run android --bundle
I get an error
An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.application/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreate failed
TypeError: Could not load view for: nativeradsidedrawer. TypeError: Cannot read property 'extend' of undefined
File: "file:///data/data/org.nativescript.application/files/app/vendor.js, line: 59885, column: 6
StackTrace:
Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 63313, column: 11
What did I do wrong?

First we need to build the app using below command
tns build android --bundle
Once build is successful we have to run below command
tns run android --bundle

Need to update tns
tns update next

Related

CodePush 400: {"status":400,"name":"Error","message":"Missing required query parameter \"deployment_key\""}

After rebuilding with React Native 0.70.1/react-native-code-push 7.05 project/Xcode 14/Monterey , npx react-native run-ios launch successfully without any error but the console screen throws error:
[CodePush] An unknown error occurred.
LOG [CodePush] 400: {"status":400,"name":"Error","message":"Missing required query parameter \"deployment_key\""}
Then I create a new app in MS appcenter for IOS and replaced the app secret with the new one just created in AppCenter-Config.plist in Xcode. But the error is the same. Before rebuilding the app, I verify that the latest react native code push 7.0.5 works with the release of React Native 0.70.
The app build in Xcode 14 went successfully. What is missing with the appcenter or app config?
In my case, I got this error because I forgot to set the CodePushDeploymentKey inInfo.plist :)
Now that I have a configuration-specific CODEPUSH_KEY in build settings, and have set the CodePushDeploymentKey to $(CODEPUSH_KEY) in Info.plist, it works!

com.gluonhq.impl.maps.MapTile on iPhone does not work

I use the MapLayer class of com.gluonhq.maps; but on the iPhone I don't see the map, but always a white screen. On Android the problem does not occur. This is the error I have in the run:
com.gluonhq.impl.maps.MapTile lambda $ new $ 1
Error: java.util.concurrent.CompletionException: java.lang.RuntimeException: Error No route to host

nativescript android resource not found

I'm trying to run a really simple nativescript project on android emulator.
I generated the project using NativeScript CLI (It's an angular project).
when I do the 'tns run android'
I have this error :
An uncaught Exception occurred on "main" thread.
android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155)
at android.content.res.Resources.getAnimation(Resources.java:1180)
at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:137)
at android.support.v4.app.FragmentManagerImpl.loadAnimation(FragmentManager.java:1073)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1554)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
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)
I don't know what i did wrong.
any of you have any tips on how to debug it?
Sincerly
Adrien
I had the same problem with the vue.js project and solved it by selecting TabView when generating the project. And make sure u installed lates version 5.0.0
npm i -g nativescript#latest, before u created project.

Appium: Unable to call start_activity to launch a different app on Android 7.0

I have mobile test where I launch my app and eventually it launches Chrome. To launch Chrome I call the start_activity function with an argument for app_package and app_activity. On devices running Android 5.0 and 6.0, Chrome will launch just fine. However, on Android 7.0 it does not launch at all.
##driver.start_activity(app_package: 'com.android.chrome',
app_activity: 'org.chromium.chrome.browser.ChromeTabbedActivity')
I get the following error:
[ADB] Error: Error occured while starting App. Original error: Cannot read property 'startsWith' of null
at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13)
at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:77:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Error occured while starting App. Original error: Cannot read property 'startsWith' of null
at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13)
at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:77:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] Encountered internal error running command: Error: Error occured while starting App. Original error: Cannot read property 'startsWith' of null
at Object.wrappedLogger.errorAndThrow (../../lib/logging.js:63:13)
at ADB.callee$0$0$ (../../../lib/tools/apk-utils.js:77:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Update: I've been able to work around this issue by launching Chrome through adb with the following command:
adb shell am start -n #{app_package_activity[application]} 'com.android.chrome/com.google.android.apps.chrome.Main'

TypeError: Cannot read property 'pushplugin' of undefined

I installed this plugin via this command:
tns plugin add nativescript-push-notifications
I added the require statement to the top of my login.js
var pushPlugin = require("nativescript-push-notifications");
When I start the app I get this error:
`java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.myapp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreate failed
Error calling module function
Error calling module function
TypeError: Cannot read property 'pushplugin' of undefined
File: "/data/data/org.nativescript.myapp/files/app/tns_modules/nativescript-push-notifications/push-plugin.js, line: 8, column: 19
StackTrace:
Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/nativescript-push-notifications/push-plugin.js', line: 8, column: 20
Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/nativescript-push-notifications/push-plugin.js', line: 9, column: 7
Frame: function:'', file:'/data/data/org.nativescript.myapp/files/app/tns_modules/nativescript-push-notifications/push-plugin.js', line: 51, column: 3
Frame: function:'require', file:'', line: 1, column: 266
Frame: fu`
My tns --version is 2.3.0
EDIT: I created another project with tns create sample1
and added the plugin using tns plugin add like above and then added the code to the main-vew-model.js. Here is the code.
RESOLUTION:
After installing the plugin I was running this command:
tns livesync android --watch
This evening after a few hours away I realized I should have been running:
tns run android
When I ran that I received this error:
Could not find any matches for com.google.android.gms:play-services-gcm:+ as no versions of com.google.android.gms:play-services-gcm are available.
A search of that lead me to a StackOverflow post here which showed me what I needed to do to get rid of that error.
After I installed the "Google Repository" in the SDK manager everything was A OK.

Resources