im taring to open my app in browser
i use ionic serve but i get this error
ng.cmd run app:serve --host=localhost --port=8100
[ng] The run command requires to be run in an Angular project, but a project definition could not be found.
[ERROR] ng has unexpectedly closed (exit code 1).
enter image description here
Related
When adding cordova camera plugin into my project then i am facing cordova build problem as follows:
Step 1: Adding ionic cordova camera plugins
Step 2: try to build the native app using ionic cordova build android --debug
then the following error is displaying
Task :app:transformClassesWithMultidexlistForDebug FAILED
D8: Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.ActionBarDrawerToggle$Delegate
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --debug exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
This problem may be from your AndroidManifest.xml. Open your AndroidManifest.xml file and find android.support.v4.app.ActionBarDrawerToggle, you will find two line for this. Comment one of them and keep only one android.support.v4.app.ActionBarDrawerToggle. Then try to run again.
This will may help you.
I change cordova-camera plugin version from 4.3.0 to 4.1.0 and now it works well this may be ionic v4 plugin issue
install the latest cordova platform[
]1
When we run this command (ionic lab) then it show this error.
how we solve it..
ng run app:serve --host=0.0.0.0 --port=8100
[ng] The run command requires to be run in an Angular project, but a project definition could not be found.
[ERROR] ng has unexpectedly closed (exit code 1).
The Ionic CLI will exit. Please check any output above for error details.
check the command line if you are in the directory containing package.json and run the following commands:
npm install
ionic serve
It seems you are not inside the right folder. You have to run your ng run command in the same place your runned your ng new command (or wherever you have initialized your Angular project).
This question already exists:
ubuntu: can't run ionic app on emulator because android SDK doesn't exist
Closed 5 years ago.
I'm using ionic2. When I run
command ionic cordova run android
,I get this error:
✖ Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova build android (exit code 1):
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting
setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH'
to include path to valid SDK directory.
Although I had set android environment variable in ~/.bachrc.
When I run command:
echo $ANDROID_HOME in terminal
,I have output:
/home/shimaa/Android/Sdk
That is what I wrote in ~/.bashrc:
export ANDROID_HOME="/home/shimaa/Android/Sdk"
export PATH=${PATH}:/home/shimaa/Android/Sdk/platform-tools:/Development/android-sdk/tools
can anyone tell me what is the problem and thank you in advance
For me I have Android_Home path inside my "Path" as "C:\Users\user\AppData\Local\Android\sdk\build-tools\26.0.0" After setting up the path, restart your system.
I'm having trouble running sync on my iOS device using NativeScript with Angular2.
The following command works well:
tns run ios --device <device_id>
But when I try to run like this:
tns livesync ios --watch --device <device_id>
I get the following error:
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0xd74aab -[TNSRuntime executeModule:referredBy:]
2 0xac487 main
registered for type RadSideDrawer.
3 0x1d0af50b <redacted>
JavaScript stack trace:
1 #file:///app/tns_modules/ui/core/dependency-observable.js:73:28
JavaScript error:
file:///app/tns_modules/ui/core/dependency-observable.js:73:28: JS ERROR Error: Property showOverNavigation already
The showOverNavigation is from the sidedrawer plugin that I'm using. But I have found other people on having the same kind of issue with other plugins.
I had the same error and I solve running the command:
tns run ios --release
with only the real device connected, that makes the app works without error.
Also in the new version of tns the command livesynch is now replaced by the 'run' command.
But with the '--release' part I cannot have all the console.log in the terminal visible.
I am building a phone gap (Cordova 3.5) app for android and trying to implement facebook login. I have installed the facebook plugin then i was getting errors in connectPlugin.java file then i imported the facebook SDK library in my project. All errors showing in eclipse are gone now but when i am trying to run 'cordova build' the build fails with the following error.
BUILD FAILED
D:\android-tool\sdk\tools\ant\build.xml:653: The following error occu
executing this line:
D:\android-tool\sdk\tools\ant\build.xml:698: null returned: 1
Total time: 12 seconds
D:\xampp\htdocs\android-app\refund_app\platforms\android\cordova\node
q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\xampp\
oid-app\refund_app\platforms\android\build.xml,-Dout.dir=ant-build,-D
e.dir=ant-gen
Error: D:\xampp\htdocs\android-app\refund_app\platforms\android\cordo
t: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\USER\AppData\Roaming\npm\node_
dova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
I solved this problem by myself actually the build was failing due to a invalid directory in facebook SDK
Mypath/facebook-android-sdk-3.23.0\facebook\bin\res\crunch
I cut all the contents from the 'crunch' folder and pasted it under 'res' folder then deleted the 'crunch' folder. Then cordova build started working.