Hello @rosen-vladimirov ,
I have recently get rid of this issue.
Now I am getting issue while running the app.
when I run "tns run android" from cmd, emulator gets started and nothing happens after it launches.
Earlier when I have connected android device and run the same command I was getting following error.
Processing node_modules failed. TypeError: Invalid Version: 1.?2.0 (in red color on cmd)
Sending exception report (press Ctrl+C to stop).....
Also please find attached log file for log trace.
log.txt
Please help.
Thanks in advance.
I confirm this is a bug on our side and it should be fixed in our next release.
Meanwhile you can use tns emulate android instead :)
Steps to reproduce:
1) Make sure you do not have any emulator started or any device attached.
2) Call tns run android inside project.
@rosen-vladimirov ,
What am I supposed to do to reflect this change at my side ?
I am still facing same issue while running app. :(
please help.
@DeepakDonde you'll have to wait for our next release in order to get it working. Meanwhile you can use the suggested workaround - start the emulator before calling tns run android.
@rosen-vladimirov
I have tried the workaround but I am getting following error -
Command platformsandroidgradlew.bat failed with exit code 1
Attaching log file for your reference.
log.txt
@DeepakDonde Please navigate to <project dir>\platforms\android and execute: ./gradelw clean
After that try tns run android again (from your project dir). If it still fails, navigate back to <project dir>\platforms\android and execute ./gradelw build -S and send us the output.
@rosen-vladimirov
Still the build failed..
A problem occurred evaluating root project 'sampleGroceries'.
Could not find method compile() for arguments [com.android.support:appcompat-v
7:22.2.0] on DefaultExternalModuleDependency{group='com.android.support', name='
support-v4', version='22.2.0', configuration='default'}.
Find log here -
log.txt
this is also happens with genymotion based device too.
@vyscond have you updated your CLI to 1.7.0 ? In case not, can you try updating it and see if it works :)
Running 1.7.0 version. But i think i "solved" my issue. I realized this morning that you guys are supporting (by default) the level 17 as minimum API and i current use a level 16.
Hi :)
I'm having issues every time i try to run my application on an emulator or my android phone. This is what it displays. SOS
gaz@gaz-HP-ProBook-430-G2:~/Desktop/groceries/sample-Groceries$ tns device
iTunes is not available for this operating system. You will not be able to work with connected iOS devices.
βββββ¬ββββββββββββββ¬βββββββββββ¬ββββββββββββββββββββ¬βββββββββ¬ββββββββββββββ
β # β Device Name β Platform β Device Identifier β Type β Status β
β 1 β β Android β D511C1ZR5A299032 β Device β Unreachable β
βββββ΄ββββββββββββββ΄βββββββββββ΄ββββββββββββββββββββ΄βββββββββ΄ββββββββββββββ
gaz@gaz-HP-ProBook-430-G2:~/Desktop/groceries/sample-Groceries$ tns run android
Executing before-prepare hook from /home/gaz/Desktop/groceries/sample-Groceries/hooks/before-prepare/nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
Project successfully prepared
:config phase: createDefaultIncludeFiles
+found plugins: tns-core-modules-widgets
{
"F0" {
dimension "tnscoremoduleswidgets"
}
} }
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in /home/gaz/Desktop/groceries/sample-Groceries/platforms/android/configurations folder...
:config phase: pluginExtend
+applying configuration from: /home/gaz/Desktop/groceries/sample-Groceries/platforms/android/configurations/tns-core-modules-widgets/include.gradle
+applying configuration from: /home/gaz/Desktop/groceries/sample-Groceries/platforms/android/configurations/include.gradle
:config phase: copyAarDependencies
:config phase: addAarDependencies
+adding dependency: /home/gaz/Desktop/groceries/sample-Groceries/platforms/android/libs/aar/widgets-release.aar
:preBuild UP-TO-DATE
:preF0DebugBuild UP-TO-DATE
:checkF0DebugManifest
:preF0ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2340Library
:prepareComAndroidSupportAppcompatV72340Library
:prepareComAndroidSupportSupportV42340Library
:prepareComAndroidSupportSupportVectorDrawable2340Library
:prepareWidgetsReleaseLibrary
:prepareF0DebugDependencies
:compileF0DebugAidl
:compileF0DebugRenderscript
:generateF0DebugBuildConfig
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:asbg:generateInterfaceNamesList
:asbg:runAstParser UP-TO-DATE
:asbg:generateBindings UP-TO-DATE
:generateF0DebugAssets UP-TO-DATE
:mergeF0DebugAssets
:generateF0DebugResValues UP-TO-DATE
:generateF0DebugResources
:mergeF0DebugResources
:processF0DebugManifest
:processF0DebugResources
:generateF0DebugSources
:compileF0DebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:compileF0DebugNdk UP-TO-DATE
:compileF0DebugSources
:buildMetadata UP-TO-DATE
:transformClassesWithDexForF0Debug
:mergeF0DebugJniLibFolders
:transformNative_libsWithMergeJniLibsForF0Debug
:processF0DebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForF0Debug
:validateDebugSigning FAILED
FAILURE: Build failed with an exception.
Unable to create debug keystore in "/home/gaz/.android" because it is not writable.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 16.409 secs
Command /home/gaz/Desktop/groceries/sample-Groceries/platforms/android/gradlew failed with exit code 1
ββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Usage β Synopsis β
β Run on all β $ tns run android [--key-store-path
β connected β -store-password
β devices and β -key-store-alias-password
β running β -justlaunch] β
β emulators β β
β Run on a β $ tns run android --device
β selected β
β connected β -alias
β device or β -release] [--justlaunch] β
β running β β
β emulator β β
β Start an β $ tns run android --emulator [
β emulator and β -store-path
β run the app β --key-store-alias
β inside it β
ββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console.
* --device - Specifies a connected device on which to run the app.
* --emulator - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other valid combination of emulator options as listed by $ tns help emulate android.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --justlaunch - If set, does not print the application output in the console.
* <Device ID> is the index or name of the target device as listed by $ tns device android
* <Emulator Options> is any valid combination of options as listed by $ tns help emulate android
Sending exception report (press Ctrl+C to stop).....
Hi,
I face this problem still. Additionally the option --watch doesn't work too. I see in log that app has been deployed or refreshed but the app is only deployed on a phone but not started. I have tried with API 23 and 24.
All NativeScript components versions information
ββββββββββββββββββββ¬ββββββββββββββββββββββββ¬βββββββββββββββββ¬ββββββββββββββ
β Component β Current version β Latest version β Information β
β nativescript β 2.3.0 β 2.3.0 β Up to date β
β tns-core-modules β 2.4.0-2016-09-30-4270 β 2.3.0 β Up to date β
β tns-android β 2.3.0 β 2.3.0 β Up to date β
β tns-ios β 2.4.0-2016.9.16.4 β 2.3.0 β Up to date β
Cheers,
Adrian
I have a variation of this: my setup USED to work OK till recently. Over the last week or so, it fails to start the app on the emulator. It does deploy, though: I can click on the app in the emulator and run the version that was just deployed. But this means I can't DEBUG - in fact, on Windows, the debug browser window comes up, but shows no code.
The changes over the last week or so have all been in my code, nothing in the environment.
Any suggestions on how to fix this?
Any update on this?
I have same issue when I follow http://docs.nativescript.org/angular/tutorial/ng-chapter-1#11-install-nativescript-and-configure-your-environment
$ tns run android
Starting Android emulator with image Emulator-Api23-Default
Cannot run your app in the native emulator. Increase the timeout of the operation with the --timeout
option or try to restart your adb server with 'adb kill-server' command. Alternatively, run the Android Virtual
Device manager and increase the allocated RAM for the virtual device.
Im with the same problem
Cannot run your app in the native emulator. Increase the timeout of the operation
with the --timeout option or try to restart your adb server with 'adb kill-server'
command. Alternatively, run the Android Virtual Device manager and increase
the allocated RAM for the virtual device.
I ran the ´´´´tns doctor´´´´and didn't find any issue
I had the same problem with Mac OS X, so I tried to launch the AVD directly from the AVD Manager and there was an error.
So I stopped Docker for Mac and it worked.
Related article: http://stackoverflow.com/a/39142955/916784
Hope it helped.
Worked for me after closing Docker on Mac.
I think the emulator somehow conflicts with Docker on Mac. I faced the same issue, and just like @joney000 , i solved it by closing Docker.
I'm still experiencing this issue, and I don't have Docker, Parallels, or VirtualBox running.
@Kjens93 and other that experience the same issue, can you try reproducing it with CLI's 3.0.0.rc1 version?
Also can you send us logs from:
$ tns run android --log trace --timeout 600
So we'll see where the process is hanging
Never mind, turns out the system image for my emulator was missing.
When i run app by using command 'tns run android' , emulator launches but app not deploy also command got terminate. u can see code below
etech@etech-406:/var/www/html/nativeApp/HelloWorld$ tns run android
Support for Node.js 8.0.0 is not verified. This CLI might not install or run properly.
Searching for devices...
Starting Android emulator with image testAVD
etech@etech-406:/var/www/html/nativeApp/HelloWorld$
Good companions
I have a big problem:
I want to run an application from VS Code with Nativescript.
I use "adb devices" and visualize my physical device or emulator ...
But if I use "tns devices" it tells me that it does not find anything.
When doing "tns run android":
tns run android
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Starting Android emulator with image 60d0f537-0e95-4ab2-8fd7-9c7ee02bf8c4
Cannot find connected devices.
Emulator start failed with: Cannot run the app in the selected native emulator. Try to restart the adb server by running theadb kill-servercommand in the Command Prompt, or increase the allocated RAM of the virtual device through the Android Virtual Device manager. NativeScript CLI users can try to increase the timeout of the operation by adding the--timeoutflag.
To list currently connected devices and verify that the specified identifier exists, run 'tns device'.
To list available emulator images, run 'tns device <Platform> --available-devices'.
And I'm desperate ... it's like there's a conflict with my adband tns
Most helpful comment