问题:

当我在ionic项目的根目录中运行ionic build android命令时,出现此错误:

失败:构建失败,发生异常。

  • 其中:脚本’/home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle’行:64

  • 出了什么问题:评估根项目“ android”时发生问题。

    找不到安装的构建工具。 请安装Android构建工具版本19.1.0或更高版本。

  • 尝试:使用–stacktrace选项运行以获取堆栈跟踪。 使用–info或–debug选项运行以获取更多日志输出。

[email protected]:~/Desktop/javadApp$ ionic build android
Running command: /home/javad/Desktop/javadApp/hooks/after_prepare/010_add_platform_class.js /home/javad/Desktop/javadApp
add to body class: platform-android
Running command: /home/javad/Desktop/javadApp/platforms/android/cordova/build 
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/default-java
Running: /home/javad/Desktop/javadApp/platforms/android/gradlew cdvBuildDebug -b /home/javad/Desktop/javadApp/platforms/android/build.gradle -Dorg.gradle.daemon=true

FAILURE: Build failed with an exception.

* Where:
Script '/home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle' line: 64

* What went wrong:
A problem occurred evaluating root project 'android'.
> No installed build tools found. Please install the Android build tools version 19.1.0 or higher.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.564 secs

/home/javad/Desktop/javadApp/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /home/javad/Desktop/javadApp/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/javad/Desktop/javadApp/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /home/javad/Desktop/javadApp/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/javad/Desktop/javadApp/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

在〜/ .profile中,我有:

导出PATH = $ PATH:/ opt / android-sdk / tools

导出PATH = $ PATH:/ opt / android-sdk / platform-tools

导出PATH = $ PATH:/ opt / node / bin

导出JAVA_HOME = / usr / lib / jvm / default-java

导出ANDROID_HOME = / opt / android-sdk

$ PATH是:

/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin:/ sbin:/ bin:/ usr / games:/ usr / local / games:/ opt / android-sdk / tools :/ opt / android-sdk / platform-tools:/ opt / node / bin

重要事项:

在文件中: /home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle | 第38行 :

String[] getAvailableBuildTools() {
    def buildToolsDir = new File(getAndroidSdkDir(), "build-tools")
    buildToolsDir.list()
        .findAll { it ==~ /[0-9.]+/ }
        .sort { a, b -> compareVersions(b, a) }
}

刚刚返回/ opt / android-sdk / build-tools !!!

/ opt / android-sdk / build-tools文件夹中,我有:

从以下位置提取的android-5.1文件夹: https : //dl.google.com/android/repository/build-tools_r22-linux.zip

When I run ionic build android command in root of ionic project, I am getting this error:FAILURE: Build failed with an exception.Where: Script ‘/home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle’ line: 64What went wrong: A problem occurred evaluating root project ‘android’.No installed build tools found.Please install the Android build tools version 19.1.0 or higher.Try: Run with –stacktrace option to get the stack trace.Run with –info or –debug option to get more log output.in ~/.profile i have:export PATH=$PATH:/opt/android-sdk/toolsexport PATH=$PATH:/opt/android-sdk/platform-toolsexport PATH=$PATH:/opt/node/binexport JAVA_HOME=/usr/lib/jvm/default-javaexport ANDROID_HOME=/opt/android-sdk$PATH is:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/android-sdk/tools:/opt/android-sdk/platform-tools:/opt/node/binImportant issue:in file: /home/javad/Desktop/javadApp/platforms/android/CordovaLib/cordova.gradle |line 38 :just returned /opt/android-sdk/build-tools !!!in /opt/android-sdk/build-tools folder i have:android-5.1 folder that extract from: https://dl.google.com/android/repository/build-tools_r22-linux.zip

问题:

我看到很多关于写入SD卡的帖子,但我相信我的问题是不同的。 在构建AVD的过程中,我无法创建SD卡。

我最初尝试使用Android SDK和AVD Manager来执行此操作,选择
姓名 :my_avd
目标 :Android 2.2 – API级别8
SD卡 :尺寸:1024 MiB
皮肤 :内置:默认(HVGA)
硬件 :属性:抽象LCD密度,值:160

这会弹出一个窗口,其中包含以下消息:
“创建AVD’my_avd’的结果:
错误:无法创建SD卡。“

我试图从命令行重复该过程,收到类似的错误:

[email protected]:~$ android create avd -n my_avd -t 1 -c 1024M
Android 2.2 is a basic Android platform.
Do you wish to create a custom hardware profile [no]no
Error: Failed to create the SD card.

试图遵循使用mksdcard的说明同样没有效果; 我认为我基本缺乏linux经验可能​​会让我在这里遇到问题。 当我尝试使用mksdcard时,它只是报告它找不到文件或目录。 mksdcard工具是否可以在linux中以这种方式使用?

[email protected]:~$ mksdcard 1024M ./sdcard.iso
bash: /home/alex/android-sdk-linux_x86/tools/mksdcard: No such file or directory
[email protected]:~$ sudo android create avd -n my_avd -t 1 -c 1024M

我已经将android工具目录添加到我的PATH变量中,但我觉得显然还有其他一些我不知道的东西。 也许某种访问权限?

试图用sudo运行android命令似乎也没有帮助:

[email protected]:~/android-sdk-linux_x86/tools$ sudo ./android create avd -n my_avd -t 1 -c 1024M
Android 2.2 is a basic Android platform.
Do you wish to create a custom hardware profile [no]no
Error: Failed to create the SD card.

我甚至尝试安装Eclipse和ADT插件并从那里运行管理器无济于事。 任何提示将非常感激。 高级警告,我有点像新手Linux用户,所以即使看起来像是一个明智的事情要检查,我仍然可能错过了它。

I see a lot of posts about writing to the SD card, but I believe my problem is different.I am unable to create the SD card during the process of building an AVD.I initially tried to use the Android SDK and AVD Manager to do this, selectingName : my_avdTarget : Android 2.2 – API Level 8SD Card : Size: 1024 MiBSkin : Built-In: Default (HVGA)Hardware : Property: Abstracted LCD Density, Value: 160This pops up a window with the message:”Result of creating AVD ‘my_avd’:Error: Failed to create the SD card.”I tried to repeat the process from the command line, receiving a similar error:Attempting to follow instructions for using mksdcard was equally unproductive;I think my basic lack of linux experience may be causing me a problem here.When I try to use mksdcard, it just reports that it cannot find the file or directory.Is the mksdcard tool available for use this way in linux?I’ve added the android tools directory to my PATH variable, but I feel like there is obviously something else I’m missing.Perhaps some kind of access rights?Attempting to run the android command with sudo did not seem to help either:I even tried installing Eclipse and the ADT plugin and running the manager from there to no avail.Any tips would be most appreciated.Advanced warning that I am somewhat of a novice Linux user, so even if it seems like a no-brainer obvious thing to check, I could still have missed it.

问题:

按照我在这里找到的说明,我一直在使用Docker来运行Quantum GIS: docker-qgis-desktop-运行QGIS桌面的简单docker容器

一切正常,直到上周我开始收到此错误消息时:

来自守护程序的错误响应:冲突。 容器235566ae17b8已使用名称“ qgis-desktop-2-4”。 您必须删除(或重命名)该容器才能重用该名称。

尽管在此站点上寻找了线索,但我不确定是什么意思。 在此之前,我没有做任何更改,并且已经使用以下命令成功启动了容器:

sudo docker run --rm --name="qgis-desktop-2-4"     -i -t     -v ${HOME}:/home/${USER}     -v /tmp/.X11-unix:/tmp/.X11-unix     -e DISPLAY=unix$DISPLAY     kartoza/qgis-desktop:latest

我怎样才能解决这个问题?

I’ve been using Docker on my to run Quantum GIS following instructions I found here: docker-qgis-desktop – A simple docker container that runs QGIS desktopEverything has been running fine until last week when I started to get this error message:Error response from daemon: Conflict.The name “qgis-desktop-2-4” is already in use by container 235566ae17b8.You have to delete (or rename) that container to be able to reuse that name.I’m not entirely sure what this means despite searching for clues on this site.I hadn’t changed anything prior to this happening and have been successfully launching the container with this command:How can I fix this?

问题:

我的当地环境是:

  • 新鲜的Ubuntu 16.04
  • 用PHP 7
  • 安装MySQL 5.7

     sudo apt-get install mysql-common mysql-server 

当我尝试登录MySQL(通过CLI)时:

mysql -u root -p

我遇到了一个包含3个步骤的循环问题。

1)首先是一些套接字问题

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

解决方案:重启PC。

这导致了另一个错误:

2)访问被拒绝

ERROR 1698 (28000): Access denied for user 'root'@'localhost'.

可能的问题? “root”用户的密码错误!

解决方案: 使用本教程重置root密码

使用正确的密码和工作套接字,会出现上一个错误。

3)auth插件不正确

mysql "ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded"

在这里,我停下来或以某种方式得到了1)。

My local environment is:fresh Ubuntu 16.04with PHP 7with installed MySQL 5.7When I tried to login to MySQL (via CLI):I came across an cyclic issue with 3 steps.1) First was some socket issueSolution: restarting PC.Which led to another error:2) With access deniedPossible issue?Wrong password for “root” user!Solution: reset root password with this tutorial .With correct password and working socket, there comes last error.3) Incorrect auth pluginHere I stopped or somehow got to 1) again.

问题:

我正在安装sylius捆绑软件,而在安装sylius时,我需要运行yarn install所以在运行命令时

yarn install

我得到错误:

错误:[Errno 2]没有这样的文件或目录:’install’

I am installing sylius bundle and while install sylius I need to run yarn install So While i run commandI get error:ERROR: [Errno 2] No such file or directory: ‘install’