2016-08-02 116 views
0

我有從iMac自制軟件安裝android sdk,我需要運行離子應用程序。本地它工作正常。但是,當我從ionic run android文件服務器我得到這個:無法從服務器運行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. 

我讀了錯誤,我已經看到了這一點:

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')

我實際上是由Android的SDK的一個副本/usr/var/lib/android-sdk剛供測試用。但它不起作用。

有人對我如何解決這個問題有任何想法嗎?

回答

1

我以前有過類似的問題,它基本上意味着你的Android Home目錄設置不正確。