I want to open a project in Android Studio (Windows) and open a specified project file, as well as the row and column.
I intend to do this by commands in CMD. It's possible? how do I do that?
I tried to use this below CMD command but the only thing i got was to open the project but no success in opening the file in the specified line and command
./studio64.exe C:\dev\flutter\MyProject\ -line 30 -column 5 main.dart
Related
i have a problem in running ./studio.sh and when I try to run it by terminal , this error shows in the picture attached
click to see image
You need to to into the directory where your studio.sh file exists as below :
/opt/android-studio/bin/studio.sh
I am using path to android studio in my system, You need to your system's path to android studio, where your android studio is located.
I want to install apk from within Eclipse IDE by right-clicking on apk file (that may be in any project, no need for ADT).
The system command to execute is adb install app-name.apk
How to archive that in Eclipse IDE ?
To run some tool Eclipse External tool may be used (that I don't know well),
but that will not appear in context menu for right-button mouse click.
Eclipse lets you right-click any file, and use Open With -> Other , where you can choose any external program or script. On Windows, I created a simple batch script with below line (you should be able to do something similar on other platforms)
adb install -r %1
and in eclipse, i right-click an apk file, and choose Open With -> Other -> above batch script , Eclipse then successfully installed the APK.
Another option: you can create Eclipse plugin, using its Commands interface. This lets you add a context-menu/right-click action. You can execute your adb command from there. Creating this plugin can be easy, please take a look at this code snippet for a sample.
Ideally you would want to use the -r option so it re-installs if apk already present on device : adb install -r app-name.apk.
I try to create an android app using PhoneGap on my Mac. But, I only can create the app (hello) and couldn't create the Android platform for it using $ cordova platform add android command.
The error message I get is: [Error: The command android failed. Make sure you have the latest Android SDK installed, and the android command (inside the tools/ folder) added to your path. Output: ]
The screenshot:
I try to put the PATH in the bash profile file using touch ~/.bash_profile; open ~/.bash_profile method, but it still didn't work.
How to solve this problem?
try this one
install android sdk in /Applications then rename the andoid sdk folder's name to android_sdk
create .bash_profile in this directory, /Users/zulhilmizainudin
open .bash_profile then type this command
export PATH=/Applications/android_sdk/tools:$PATH
export ANDROID="/Applications/android_sdk/tools"
Save .bash_profile file
type android command in your terminal
I need to do somethings that must be done from the command prompt of the android tool.
but every one says it's in the platform tools folder in the sdk path but which file is it?
that might help:
the contents of platform tools folder:
aapt.exe
adb.exe
aidl.exe
dexdump.exe
dx.bat
fastboot.exe
llvm-rs-cc.exe
source.properties
AdbWinApi.dll
AdbWinUsbApi.dll
Did you mean android Adb command lin tool if so see this link
if you want to manage emulator from command line see these three link it will help you a lot
Android Emulator
Using the Android Emulator
Android Emulator on Linux
There is an android command, but it's not an executable - run the android.bat in the tools directory, and you should be able to make the changes you need. If you add the tools directory to your system path, you'll be able to run android from any directory when using the command line.
I'm still pretty new to Android and programming in general, and I can't seem to get the command line tools packaged with the Android SDK to work. I'm running Mac OSX and each time I try to run layoutopt, for example, the terminal returns, *-bash: cmd: command not found
*
Also, is it okay to have my SDK located in the Developer directory and my android project in some unrelated directory when using these tools?
If you want you can put the path in your ~/.bash_profile so you can call it from anywhere:
export ANDROID_HOME=/Users/<username>/path/to/sdk/tools
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
You may want to include also the platform-tools into your ~./bash_profile
### Android dev tools
export ANDROID_HOME="/Users/myusername/DEV/tools/adt-bundle-mac-x86_64/sdk"
export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH"
You will need to start a new terminal session or run
source ~/.bash_profile
to loads the values immediately without having to open a new terminal session.
The current (2016-08-17) answer to this question is:
~/Library/Android/sdk
So my bash_profile contains:
export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
I figured it out. I needed to go to the /tools directory in the SDK folder and type in:
./layoutopt <directorypath>
Problem is your command line tool is not seeing required programs from /path/to/sdk/tools.
One solution as user NKijak mentioned is to add those tools to your Home path and the other is to run command line from location where your sdk tools are stored. Here is a tutorial how to do just that http://hathaway.cc/2008/06/how-to-edit-your-path-environment-variables-on-mac-os-x/
Other way is, when opening command line just change your current dir to /path/to/sdk/tools and then run the tools. In windows you can just shift+right click in file explorer and pick open command windows here I am not sure is there equivalent on MacOS but there are some extensions you can install to add this option. Also total commander in windows has command line where you can start command line from current location there are similar programs on mac like Midnight Commander that have same option.
Here is a good description:
To connect to the console of any running emulator instance at any time, use this command:
telnet localhost <console-port>