i'm trying to install flutter on my windows and when i type flutter doctor on cmd i get error then it exit the cmd with no error message , and i try to write flutter doctor on git batch i get this error message
Checking Dart SDK version...
The term 'Unblock-File' is not recognized as the name of a cmdlet, function, sc
ript file, or operable program. Check the spelling of the name, or if a path wa
s included, verify that the path is correct and try again.
At line:1 char:13
+ Unblock-File <<<< -Path 'C:\flutter/bin/internal/update_dart_sdk.ps1'; & 'C:
\flutter/bin/internal/update_dart_sdk.ps1'; exit $LASTEXITCODE;
+ CategoryInfo : ObjectNotFound: (Unblock-File:String) [], Comman
dNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Flutter requires PowerShell 5.0 or newer.
See https://flutter.dev/docs/get-started/install/windows for more.
Current version is 2.
i have made variable name path with this value
C:\Windows\System32;C:\Program Files\Git\git-
cmd.exe;C:\flutter\bin;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program
Files\Git\bin\git.exe;C:\Program Files\Git\cmd
You will need to install Powershell 5.0. I also recommend you to check the system requirements page for installing flutter.
Related
this is the error that I get when I enter run flutter in the command line
+ CategoryInfo : ObjectNotFound: (run:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Any ideas how can I fix it?
I deleted and reinstalled android still thinking that it was a problem with the version I'm using but it still not working
From the error message, it looks like you are using a Windows system. Make sure you have downloaded flutter and added its bin folder to the Path variable.
This can be done as follows:
Press the start button and type env
Open "Edit environment variables for your account"
Look for an entry called Path. If it does not exist, click "New..." to create it.
Click on the Path item and the path to your flutter/bin folder C:\<your_path>\flutter\bin
I have follwed every step to install amplify and created IAM user successfully.
I am getting this error when I am typing amplify init in android studio terminal
amplify : The term 'amplify' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At line:1 char:1
+ amplify configure
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (amplify:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
C:\Users\saurabh.trivedi\.cordova\lib\android\cordova\3.3.0\bin\node_modules\q\q
.js:126
throw e;
^
Error: ERROR : executing command 'ant', make sure you have ant installed and add
ed to your path.
at C:\Users\saurabh.trivedi\.cordova\lib\android\cordova\3.3.0\bin\lib\check
_reqs.js:47:27
I faced similar error. To overcome the issue I downloaded and installed apache-ant-1.9.2 into the "C:\Program Files\apache-ant-1.9.2\" folder and added the "C:\Program Files\apache-ant-1.9.2\bin\;" to the "Path" environment variable.
Note, that additional environment variables (ANDROID_HOME) and paths to JRE, and Android SDK are also should be set for correct Cordova CLI operation under Windows for me:
ANDROID_HOME = C:\Program Files (x86)\ADT\sdk
Path = ...<some paths for other programs>... + C:\Windows\Microsoft.NET\Framework\v4.0.30319\;C:\Program Files\apache-ant-1.9.2\bin\;C:\Program Files (x86)\Java\jre7\bin\;C:\Program Files (x86)\ADT\sdk\tools\
I faced the same issue. here is the exact solution.
Control Panel\System and Security\System\
click advanced system settings
click Environment variables
In system variables :
ANT_HOME: C:\ant
path: %ANT_HOME%\bin;
This will work..
I am trying to setup a basic "hello world" PhoneGap project. I've been walking through the steps found at http://docs.phonegap.com/en/2.7.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android. I am doing this on a Windows 7 Ultimate machine.
I have successfully setup Java and Ant. I have confirmed this by typing "javac -version" in a command prompt (1.6.0_39 is shown). When I type "ant" in a command prompt, I receive a message that says "Buildfile: build.xml does not exist! Build failed". At this point, I'm confident I've done everything properly through step 3. However, when I get to step 4, I run into issues.
On step 4 when I type "create C:\Tests\Android Test MyNamespace.Test.Android" in a command prompt, I receive an error that says: "create is not recognized as an internal or external command, operable program or batch file.". What could be wrong? Where does "create" come from? I'm in the /Cordova/phonegap-2.7.0/phonegap-2.7.0/lib/android directory when I run the command, I receive the following error:
Creating new android project...
Copying template files...
Copying js, jar & config.xml files...
Copying cordova command tools...
Updating AndroidManifest.xml and Main Activity...
C:\Program Files\Cordova\phonegap-2.7.0\phonegap-2.7.0\lib\android\bin\create.js
(31, 5) Microsoft JScript runtime error: Path not found
I can see the create.js file. However, for some reason I'm getting this "Path not found" error. Did I enter an incorrect command prompt parameter? I keep staring at it and everything looks correct.
Thank you!
Same problem here...
Strangely if I run the comand "Create" with no parameters, it creates a folder "example" with a sample app, without the error
I found the answer in: https://groups.google.com/d/msg/phonegap/tnz2DnUE-E0/ADZibhwHGpYJ
The problem is with this line in "create.js":
var ACTIVITY_PATH=PROJECT_PATH+'\\src\\'+PACKAGE_AS_PATH+'\\'+ACTIVITY+'.java';
[...]
exec('%comspec% /c copy "'+ROOT+'"\\bin\\templates\\project\\Activity.java '+ ACTIVITY_PATH +' /Y');
The Windows "copy" command will not create directories that don't exist, so the command above fails because "src\PACKAGE_AS_PATH" doesn't exist. This can be fixed with:
var ACTIVITY_DIR=PROJECT_PATH + '\\src\\' + PACKAGE_AS_PATH;
var ACTIVITY_PATH=ACTIVITY_DIR+'\\'+ACTIVITY+'.java';
[...]
exec('%comspec% /c mkdir ' + ACTIVITY_DIR);
exec('%comspec% /c copy "' + ROOT + '"\\bin\\templates\\project\\Activity.java ' + ACTIVITY_PATH + ' /Y');
Check your environment path:
Set Environment variables:
Path:
Start -> Control Panel -> System and Security -> System -> Environment variables
Or
Mycomputer -> Right Click -> properties -> Advance System settings -> Environment variables
1. Java JDK
2. Android SDK
3. ANT
User variables for user1:
Path: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Users\user1\AppData\Roaming\npm\
Temp:
%USERPROFILE%\AppData\Local\Temp
System variables:
ANDROID_HOME: C:\Nithi\software\Android_sdk\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\
Path:
ANT_HOME: C:\ant
JAVA_HOME: C:\Program Files\Java\jdk1.7.0_45\
JAVA_PATH: C:\Program Files (x86)\Java\jre7\bin
Path: c:\Program Files (x86)\Intel\iCLS Client\;c:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;%ANT_HOME%\bin;%JAVA_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
is your Environment variables set for JAVA and ANT? Also, can you share the create command you are using? There should be no spaces in package names.
You should be in Cordova/phonegap-2.7.0/phonegap-2.7.0/lib/android/bin directory. Then type:
create {path} {project.with.dots} {YourProjectName}.
For example, I just ran:
C:\server\cordova\phonegap-2.7.0\phonegap-2.7.0\lib\android\bin> create ../MyTest my.test.com MyTestProject and it created MyTest folder in C:\server\cordova\phonegap-2.7.0\phonegap-2.7.0\lib\android\.
Also, if you do echo %PATH%, you should see the directories to your ant\bin, android-sdk\tools, android-sdk\platform0tools, and %JAVA_HOME%.
I think you should put your path to the project directory in "" otherwise the create script will interpret "Test" as the package name, which is obviously not a valid package name.
So command should read:
create "C:\Tests\Android Test" MyNamespace.Test.Android AndroidTest
It looks like the project name cannot have dots in it.
C:\Phonegap\android\bin>create c:\android\helloworld3 com.hello.world helloworld
Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft
Corporation. All rights reserved.
C:\Phonegap\android\VERSION Creating new android project... Copying
template files... Copying js, jar & config.xml files... Copying
cordova command tools... Updating AndroidManifest.xml and Main
Activity... c:\android\helloworld3\src\com\hello\world\helloworld.java
c:\android\helloworld3\src\com\hello\world\helloworld.java
c:\android\helloworld3\AndroidManifest.xml
c:\android\helloworld3\AndroidManifest.xml
c:\android\helloworld3\AndroidManifest.xml
(works ok)
But...
C:\Phonegap\android\bin>create c:\android\helloworld4 com.hello.world hello.world
Microsoft (R) Windows Script Host Version 5.8 Copyright
(C) Microsoft Corporation. All rights reserved.
C:\Phonegap\android\VERSION Creating new android project... Copying
template files... Copying js, jar & config.xml files... Copying
cordova command tools... Updating AndroidManifest.xml and Main
Activity...
c:\android\helloworld4\src\com\hello\world\hello.world.java
C:\Phonegap\android\bin\create.js(32, 5) Microsoft JScript runtime
error: Path not found
(fails)
Unhelpful error message though.
I installed the all the recommended programs from PhoneGap's Getting Started Guide and followed the various steps.
I created the .bash_profile file and it looks like this:
export PATH=${PATH}:/Development/android-sdk-mac/sdk/platform-tools:/Development/android-sdk-mac/sdk/tools
The Development folder is located on my desktop. Upon navigating in terminal to my bin directory and creating a new PhoneGap project, i did like so:
./create /Users/joey/PhoneGapExample nl.symvoli.phonegapExample PhoneGapDemo
I get the following error:
An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1
Deleting project...
I searched around what might cause this problem and everything seems to be pointing to value of the $PATH environment variable. When i ran echo $PATH in my terminal, it returns this:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Development/android-sdk-mac/sdk/platform-tools:/Development/android-sdk-mac/sdk/tools
Any help would be much appreciated.
I'm on a Mac, running Mac OSX 10.8.3
just command this in terminal/console
export PATH=${PATH}:"/Applications/Android Studio.app/sdk/tools":"/Applications/Android Studio.app/sdk/platform-tools"
check with echo $PATH and you show this
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Applications/Android Studio.app/sdk/tools:/Applications/Android Studio.app/sdk/platform-tools
have you executed the ./create script with sudo?
if you run the script with sudo:
sudo ./create .....
you have another environment setted.
otherwise you have to export ANDROID_BIN variable
export ANDROID_BIN=/<your_android_sdk>/tools/android
I had the same issue. For me the issue was that I had set the PATH variable as described in step 3 of the tutorial, but I made a mistake and the PATH I specified was actually wrong.
So if it does not work with sudo, you might want to try and check the path again.
When I ran ./create I immediately received an error:
An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1
Deleting project...
If you open up the create file (phonegap-2.7.0/lib/android/bin/create) with textEdit, there is a line that lists
ANDROID_BIN=”${ANDROID_BIN:=$( which android )}”.
The “which android” is the cause of the issue
If you replace this line with the full path to your android tools (SDK), it should resolve the issue. It looked like this:
ANDROID_BIN=/Users/cswjs/Documents/Dev/adt-bundle/sdk/tools/android
Hope this could help someone!
you can also try this
1.
open ~/.bash_profile
2.
export PATH=${PATH}:"/Users/**username_here**/Documents/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:/Users/**username_here**/Documents/adt-bundle-mac-x86_64-20131030/sdk/tools"
3.
source ~/.bash_profile
Close Terminal, open Termial again and ...
just like found in here: http://yandr.randy.boy.jp/?eid=6
didn't understand a word but saw the last link and it worked for me :D
I've the same issue, in my configuration (mac pro + android studio) the sdk path was "/Applications/Android Studio.app/sdk". The problem is how you specify in "export $PATH=..." a new path added (/Application/Android Studio.app/sdk/tools and so on), seem that using '"' work with export $PATH for bash but does not work with script "create" with Phonegap. My end solution it's to move sdk in an alternative directory without blank in is name.
This is probably because of a wrong PATH. Refer this blog post