每当我打开终端时,我都会收到此消息:Android:未找到命令。有人能帮我解决这个问题吗?

每当我打开终端时,我都会收到此消息:Android:未找到命令。有人能帮我解决这个问题吗?

在此处输入图片描述

我的操作系统是 ubuntu 18.04,我安装了 Android-Studio 3.4 sudo apt ~,每次运行终端时都会收到此消息。因此,我卸载了 Android-Studio,希望此消息消失。然后我再次使用内置安装程序“Ubuntu Software”安装 Android-Studio。但是,我仍然收到此消息:

Android: command not found. 

此外,我的联想(8 GB 内存)笔记本电脑在 Android-Studio 上很容易冻结。

以下是 inxi -Fxx 的输出:

System:    Host: tommy-lenovo Kernel: 4.18.0-21-generic x86_64
           bits: 64 gcc: 7.3.0
           Desktop: Gnome 3.28.4 (Gtk 3.22.30-1ubuntu3) dm: gdm3
           Distro: Ubuntu 18.04.2 LTS
Machine:   Device: laptop System: LENOVO product: 81LW v: Lenovo IdeaPad L340-15API serial: N/A
           Mobo: LENOVO model: LNVNB161216 v: No DPK serial: N/A
           UEFI: LENOVO v: ARCN25WW date: 01/24/2019
           Chassis: type: 10 v: Lenovo IdeaPad L340-15API serial: N/A
Battery    BAT0: charge: 36.2 Wh 97.2% condition: 37.2/36.0 Wh (103%)
           volts: 13.0/11.3
           model: LGC L18L3PF1 serial: 6501 status: Charging
CPU:       Quad core AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx (-MT-MCP-) 
           arch: Zen rev.1 cache: 2048 KB

           flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm) bmips: 18365
           clock speeds: min/max: 1400/2300 MHz 1: 1226 MHz 2: 1224 MHz
           3: 1375 MHz 4: 1234 MHz 5: 1223 MHz 6: 1226 MHz 7: 1223 MHz
           8: 1223 MHz
Graphics:  Card: Advanced Micro Devices [AMD/ATI] Picasso
           bus-ID: 03:00.0 chip-ID: 1002:15d8
           Display Server: x11 (X.Org 1.20.1 )
           drivers: fbdev,ati (unloaded: modesetting,vesa,radeon)
           Resolution: [email protected]
           OpenGL: renderer: llvmpipe (LLVM 7.0, 128 bits)
           version: 3.3 Mesa 18.2.8 (compat-v: 3.1) Direct Render: Yes
Audio:     Card-1 Advanced Micro Devices [AMD] Device 15e3
           driver: snd_hda_intel bus-ID: 03:00.6 chip-ID: 1022:15e3
           Card-2 Advanced Micro Devices [AMD/ATI] Device 15de
           driver: snd_hda_intel bus-ID: 03:00.1 chip-ID: 1002:15de
           Sound: Advanced Linux Sound Architecture v: k4.18.0-21-generic
Network:   Card-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter
           driver: rtl8821ce port: 3000 bus-ID: 01:00.0 chip-ID: 10ec:c821
           IF: wlp1s0 state: up mac: 28:39:26:1d:4b:45
           Card-2: Realtek RTL8111/8168/8411 PCIE Gigabit Ethernet Controller
           driver: r8169 v: 2.3LK-NAPI port: 2000
           bus-ID: 02:00.0 chip-ID: 10ec:8168
           IF: enp2s0 state: up speed: 100 Mbps duplex: full
           mac: e8:6a:64:d1:d6:19
Drives:    HDD Total Size: 512.1GB (9.8% used)
           ID-1: /dev/sda model: SATA_SSD size: 512.1GB
           serial: BB0407911C5300469075
Partition: ID-1: / size: 468G used: 47G (11%) fs: ext4 dev: /dev/sda2
RAID:      System: supported: N/A
           No RAID devices: /proc/mdstat, md_mod kernel module present
           Unused Devices: none
Sensors:   System Temperatures: cpu: No active sensors found. Have you configured your sensors yet? mobo: N/A
Info:      Processes: 288 Uptime: 11 min Memory: 1484.6/5898.4MB
           Init: systemd v: 237 runlevel: 5 Gcc sys: 7.4.0
           Client: Shell (bash 4.4.191 running in gnome-terminal-) inxi: 2.3.56 

有人可以帮我让这个消息(Android: command not found)消失吗?

  • 感谢对 raz0r 的评论:我Can you check /etc/profile and your ~/.bashrc?在这里添加它,因为它太长,无法添加为评论。

的输出tommy@tommy-lenovo:~$ cat /etc/profile是:

\# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) <br>
\# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "${PS1-}" ]; then
  if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
    # The file bash.bashrc already sets the default PS1.
    # PS1='\h:\w\$ '
    if [ -f /etc/bash.bashrc ]; then
      . /etc/bash.bashrc
    fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

if [ -d /etc/profile.d ]; then
  for i in /etc/profile.d/*.sh; do
    if [ -r $i ]; then
      . $i
    fi
  done
  unset i
fi

并且the output of ~/.bashrc是 :

tommy@tommy-lenovo:~$ cat ~/.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

# append to the history file, don't overwrite it
shopt -s histappend

# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
    xterm-color|*-256color) color_prompt=yes;;
esac

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
#force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
    # We have color support; assume it's compliant with Ecma-48
    # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
    # a case would tend to support setf rather than setaf.)
    color_prompt=yes
    else
    color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
    ;;
*)
    ;;
esac

# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    alias ls='ls --color=auto'
    #alias dir='dir --color=auto'
    #alias vdir='vdir --color=auto'

    alias grep='grep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias egrep='egrep --color=auto'
fi

# colored GCC warnings and errors
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# Add an "alert" alias for long running commands.  Use like so:
#   sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

********
* java8
********
export JAVA_HOME=/opt/jdk1.8.0_211
export PATH=$JAVA_HOME/bin:$PATH

***************
* Hadoop-2.7.7
***************
export HADOOP_HOME=/opt/hadoop-2.7.7
export PATH=$HADOOP_HOME/bin:$PATH

************
* Spark-2.4
************
export SPARK_HOME=/opt/spark-2.4.0-bin-hadoop2.7
export PATH=$SPARK_HOME/bin:$SPARK_HOME/sbin:$PATH

相关内容