Recently, I want to build an Android project in centos. after jdk and Androidsdk are configured, I also configure the java and Android environment variables in/etc/profile, however, you cannot directly use the androidupdateproject command like in windows. The following occurs: bash: android: commandnotfound. at this time, we can use the ln command
Recently, I want to build an Android project in centos. after jdk and Android sdk are configured, the environment variables of java and Android are configured in/etc/profile, however, you cannot directly use the android update project command in windows.
The following occurs: bash: android: command not found.
In this case, we can use the ln command to add android to the/usr/bin directory. the detailed solution is as follows:
1. use cd/usr/bin to enter the Directory
2. use the ln-s-f android sdk installation directory/tools/android command to link android to this directory.
3. complete. Now we can use the android command in any directory.
Therefore, you can use bash: ant: command not found to solve the problem.
Finally, we attached the linux ln command description: ln is another important command in linux. its function is to create a synchronization link for a file in another location.
Syntax:
1. link a file to a file ln [-f |-n] [-s] SourceFile [TargetFile]
2. link one or more files to a directory ln [-f |-n] [-s] SourceFile... TargetDirectory