Cordova debug: the specified file was not found - android

I'm working on a Cordova project for Android using Visual Studio 2015. I can build my project without error and I can deploy it on Ripple.
But when I want to deploy on a real device or on an emulator, I'have always the same error: the specified file was not found. No more information in error list or output (using diagnostic output).
When I try to deploy on the emulator, the emulator receive the application and I can use it but when the app is lauched I have a pop-up from Visual Studio: "the specified file was not found" and I can't debug.
When I try to deploy on a real device, I have directy a pop-up: "there were deployment error. Continue ?" if I click on "yes", I have the popup "the specified file was not found".
I would like to have a solution and an explanation about this error.
Thank you in advance, I can't work with this kind of error except deploying on emulator and don't use debugging...

It seems like you are missing a third party component (such as Android Studio), so Cordova is creating an Android project, but Android is not compiling that project into an Android app. That's why it deploys on Ripple (which just uses the first half of the build) but fails on the second half. I'd make sure that you do have Android home set up (check the path in Tools->Options->Tools for Apache Cordova). Otherwise, feel free to email your question + current project to vscordovatools#microsoft.com. I can take a look at it on my machine.
Linda Zhong, Tools for Apache Cordova PM
Lizhong#microsoft.com

Related

when i use "tns preview" to start an android emulator i get an error code

i want to preview my nativescript code on an android emulator which as i use the command line which is, i navigated to my app folder which which was successfully but when i type "tns preview" to run an android emulator to see my code in action i get
Found peer TypeScript 3.1.6
#
# Fatal
process OOM in insufficient memory to create an Isolate
#
TypeScript compiler failed with exit code 3221225477
and an android emulator is connected successfully, even nativescript notice the emulator, please what do i do
i have tried the Nativescript sidekick to start the emulator but the nativescript sees the android emulator and it did not report an error indication but when i select the android emulator and click "Run on Device" i get
Build failed. TypeScript compiler failed with exit code 3221225477
even i have tried using my android device for previewing it which i install the nativescript playground & nativescript preview but if i scan the QR Code it is not previewing, please help out
please i need a solution
Preview is to be used with real device for quick testing. The basic idea is to avoid setting up whole iOS / Android SDKs on your local machine.
Produces a QR code which can be used to preview the app on a device without the need to install various SDKs and tools or configure your environment for local iOS or Android development.
To scan the QR code and deploy your app on a device, you need to have
the NativeScript Playground app:
App Store (iOS):
https://itunes.apple.com/us/app/nativescript-playground/id1263543946?mt=8&ls=1
Google Play (Android):
https://play.google.com/store/apps/details?id=org.nativescript.play
If you want to view your app on your android emulator, run the command
'tns run android --emulator'
This is assuming you already have an emulator set up on your machine.
To see a list of your available devices run the command
'tns device'
If you have not set up an emulator follow setup here: https://docs.nativescript.org/tooling/android-virtual-devices

Android Studio: more info about "Error installing app"

When trying to run the app on the device, I'm facing the following issue:
I the Event Log, there is the same message:
Where can I find more info about the error?
Might work if you Clean the project or rebuild the project and if you launching in emulator uninstall from the emulator or from mobile.
UPDATE:
i think there will be no more information about the error...
It's our common mistakes.
As per my knowledge about this issue there can be a few reasons for that:
First is that your app is already installed with the same package
name but with different certificate, To resolve this check if your
phone has that app already installed then uninstall it and try to
install new one.
The second reason can be that you are trying to install the
application that has minimum SDK version higher than the Android
version of device. To solve this make sure that the minimum SDK
version defined in your project's "build.gradle" is lower than the
Android version of your device.
Turning off the Instant run removed error for Android Studio 2.3.
sometimes project location contained the special character.
Example: E:\Android_Projects\T&PUIET,KUK\app\build\outputs\apk\app-debug.apk
close android studio > rename folder containing the special character(here T&PUIET,KUK ) > restart android studio.
Hope it will help!

pressing debugging button in Qt creator gives unknown error

I have just started internship in a company, they said i will be working on a android project using qt.I need to join them by next week, in meantime i thought of installing qt on my laptop which has Ubuntu 15.04(64-bit).
I downloaded Android SDK, Android NDK, Ant Executeable.
Here is my android settings in qt.
I created a sample app using New Project -> Qt quick Application,it pasted some sample code for hello world when i tried running it it said
could not find the executable please specify one qt
then i opened my project folder and specified a file having name same as my project name,fortunately it worked.
Now when i run the project it displays hello world but when i try to debug it either by attaching external device or through emulator it displays a pop-up which displays a string "Unknown error".
1.Have i specified the settings correctly?
2.how to get rid of this error and start debugging.
can i do debugging on my device in ubuntu.
I am just a beginner plz provide easily understandable answer.

Android Studio Blank Activity Compilation Fails

I have been coding for a few years now and decided it was time to sink my teeth into android development. So I downloaded the latest version of Android Studio and installed all the relevant components with the installer.
However when i try to create a new project, using the blank activity, without even changing a single line of code, or editing the project in any way, the compile fails with the below error:
android execution failed for task :app:packageDebug
> Implementing Class
I have no idea of to fix this, any help would be greatly appreciated.
Thanks
I have been having the same error message. This is what I have found out:
I have a Mac Book Air with a Custom OS Image installed (from work) and on this computer I see the same error message above even from a fresh install (custom image) and fresh install of JavaRE and JDK as per the Android Studio System Requirements. Also a fresh install of Android Studio using a Blank activity with no additional lines of code.
However, I reinstalled OS X 10.10 from scratch, straight from the App store, with no OS customizations, installed the same JavaRE, JDK and Android Studio and the Error message did not appear.
I have been scratching my head over this error for a while now and this is the only solution that I have found. I'll keep digging and report back if I find a better solution.

Phonegap app for iOS without Phonegap Build

So I asked and answered the question [how to do Phonegap 3.0 without Phonegap Build][1]. Now my app is ready for iOS as well (I think) and it's time to start deploying and debugging for that platform.
The formal question: how can I add the iOS platform to a Phonegap 3.0 project?
This answer is still in progress.
Goals I've achieved:
Compiling the project in command line, then running on device or sim using xCode
Attempts failed:
Compiling and running (device/sim) all from the command-line
1. Creation
I could easily add the iOS platform as described in the docs' iOS Platform Guide.
Basically, if the project already exists because you did Android first, this is how you set up the iOS app structure.
$ add platform ios
Then you should add files to the main /www folder if you didn't already have them from your Android work. Then this takes care of creating the app in debug form:
$ cordova prepare //Creates all the necessary source filed
$ cordova compile //Creates an ipa file
//Alternatively, do both in one go with cordova build
2. Deploying to device
But it is completely unclear how to use the command line interface to actually deploy the test app to device or emulator.
When you attach a physical iOS device, and simply try this from the main project folder...
$ cordova run ios
You get a pretty clear answer:
[Error: An error occurred while running the ios project. Targeting a device is not supported currently.
]
So I've resigned myself that for device testing, I must still use xCode. No biggie. However, xCode cannot "refresh" the project by itself after you've updated your files, so in between deploys you must go back to the command-line to recompile the iOS app.
Strangely, when I update my code, I do need to use "cordova run ios" (even with the above error) in order for the the /platforms/ios/www folder to be updated. So this is what works and does not work:
$ cordova run ios
//Rebuilds the app with main /www files successfully,
//then tries to deploy to device and fails in that.
$ cordova prepare ios
//Does not rebuild with main /www files
//(Also does not deploy but that is not its intended function)
And remember that you also need to clean your xCode project in between runs. So the sequence is:
Previous run
Edit your code
In console, do: cordova run ios
In xCode, Menu bar > Product > Clean product
in xCode, Run
3. Deploying to emulator
Still, "deploying to device is not possible" begs the question "What about emulator?"...
The docs page on the 3.0 command-line interface mentions you should enter the command
$ /path/to/my_new_project/cordova/run
This had me all confused. What kind of path is that? From where are you supposed to run it? Is it a nice way of providing a command you can run from anywhere? Why force me to enter my annoyingly long project path for each command?
Confusingly, the run command doesn't work if you actually go to the "platforms/ios/cordova" directory where the run executable is located.
The trick is to be one directory lower, i.e. at the /platforms/ios subfolder of your Cordova app project. There you type "cordova/run". Then in my case it starts building.
4. Install "ios-sim"
But that was not the end of it. I subsequently get an unanticipated error about "ios-sim" not being installed.
[...]
** BUILD SUCCEEDED **
Error: ios-sim was not found. Please download, build and install version 1.5 or greater from https://github.com/phonegap/ios-sim into your path. Or 'brew install ios-sim' using homebrew: http://mxcl.github.com/homebrew/
Fortunately that project webpage has adequate documentation on how to install. However, even after adding the ios-sim directory to my $PATH, when I want to emulate I get the following error.
$ cordova emulate ios
[TypeError: Arguments to path.join must be strings]
This is where I am currently stuck. My path looks exactly like this (all in one line):
export PATH=${PATH}:/Applications/adt-bundle/
sdk/platform-tools:/Applications/adt-bundle/sdk
/tools:%JAVA_HOME%\bin%ANT_HOME%\bin:"/Users/
cool/Library/Developer/iossim"
What am I doing wrong? I've tried with and without doublequotes, and I've even renamed the ios-sim directory to iossim in case the hyphen was the problem. No effect.
So no simulator for now.
5. Install to iOS App Store
This is the point where Phonegap really leaves you out in the woods. Maybe because they want you to use their paid app publishing service, but also because the process of publishing an iOS app is basically soemthing you do using xCode, iOS Developer Portal, and iTunes Connect.
So here that goes:
You need to have all the right certificates and profiles for your app (yes, it's a bunch of incomprehensible virtual documents that all require each other, Apple is like the Soviet Union of app stores).
You request those certificates and profiles in the iOS Developer Portal, save them to disk, then double-click them so that xCode knows you have them and will include them in your app.
This is the docs page for xCode 4 on how to publish your app.
The most counter-intuitive bit is that in order to publish your app, you first have to create an archive of it in xCode (Open your project in xCode > menu bar > Product > Archive).
When the archive is made, you will see it in the Organizer view under the Archives tab. There should be two buttons: Validate and Distribute. Validate checks and includes all your profiles and certificates in the app, and it also checks for errors like a wrong version number.
Distribute does what it says: it sumbits the app to the App Store.
Congratulations! (Now wait five days)

Categories

Resources