我在iMac中安装了homebrew安装的android sdk,我需要运行一个离子应用程序。在当地它工作正常。但是当我从文件服务器http://localhost:8888/x/
得到这个时:
ionic run android
我读错了,我看到了这个:
iMac-de-Iwwa:ClickNoticias hugo$ ionic run android
cordova-custom-config: Skipping auto-restore of config file backup(s)
Running command: "/Volumes/Sites/apps/Click Notícias/ClickNoticias/hooks/after_prepare/010_add_platform_class.js" "/Volumes/Sites/apps/Click Notícias/ClickNoticias"
add to body class: platform-android
cordova-custom-config: Applied custom config from config.xml to /Volumes/Sites/apps/Click Notícias/ClickNoticias/platforms/android/AndroidManifest.xml
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home
Observed package id '..;..;..;var;lib;android-sdk;samples;android-19' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-19' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-19')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-20' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-20' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-20')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-21' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-21' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-21')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-22' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-22' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-22')
Observed package id '..;..;..;var;lib;android-sdk;samples;android-23' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-23' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-23')
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
FAILURE: Build failed with an exception.
* What went wrong:
java.io.IOException: Operation not supported
> Operation not supported
* 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: 2.025 secs
Error: /Volumes/Sites/apps/Click Notícias/ClickNoticias/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
java.io.IOException: Operation not supported
> Operation not supported
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
我实际上只是为了测试而将android-sdk的副本复制到Observed package id '..;..;..;var;lib;android-sdk;samples;android-19' in inconsistent location '/usr/local/Cellar/android-sdk/24.4.1_1/samples/android-19' (Expected '/usr/local/Cellar/android-sdk/24.4.1_1/../../../var/lib/android-sdk/samples/android-19')
。但它不起作用。
有人知道如何解决这个问题吗?
答案 0 :(得分:1)
之前我遇到过类似的问题,这实际上意味着您的Android主目录未正确设置。