1. 程式人生 > >ionic2 打包android包時報'C:\Users\Administrator\AppData\Local\Android\sdk' does not exist.

ionic2 打包android包時報'C:\Users\Administrator\AppData\Local\Android\sdk' does not exist.

寫在前面

為了能及時的將自己踩到的前端坑(包括ionic,angular,ReactNative,小程式,APICloud)分享給大家,以後會逐漸將文章轉移到微信公眾號:前端e家(front_e_family)。可直接掃碼關注,公眾號會不定期更新新文章,分享踩坑筆記!期待您的關注!
這裡寫圖片描述

錯誤日誌:

  • What went wrong:
    A problem occurred configuring root project ‘android’.

The SDK directory ‘C:\Users\Administrator\AppData\Local\Android\sdk’ does not exist.

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

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

The SDK directory ‘C:\Users\Administrator\AppData\Local\Android\sdk’ does not exist.

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

解決方案:

這裡寫圖片描述

找到如圖中的local.prooerties檔案,將下圖的sdk換成你的本地SDK的位置即可。
注意:如果沒有這個檔案編譯時會報另一種錯誤,大概就是說沒有可用的SDK,這時要去找個local.prooerties檔案拷貝到圖中目錄下(自己新建一個這樣的檔案也行),然後再將你本地的SDK地址新增進來,還要注意,路徑中的使用的是反斜槓 \ ,我有次就掉進了這個坑裡!!!

相關推薦

ionic2 打包android時報'C:\Users\Administrator\AppData\Local\Android\sdk' does not exist.

寫在前面 為了能及時的將自己踩到的前端坑(包括ionic,angular,ReactNative,小程式,APICloud)分享給大家,以後會逐漸將文章轉移到微信公眾號:前端e家(front_e_family)。可直接掃碼關注,公眾號會不定期更新新文章,分享踩坑

C:\Users\zhen\AppData\Local\Android\Sdk\platform-tools\adb'' finished with non-zero exit value 1

Android studio編譯時報錯 Process 'command 'C:\Users\zhen\AppData\Local\Android\Sdk\platform-tools\adb'' finished with non-zero exit value 1 只需要在setting

vs2010 'C:\Users\Administrator\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml'錯誤

這兩天為了一個WM 6.5的開發,在原有的VS2010的基礎上裝了VS2008(坑爹的VS2010隻身投奔了WP 7),但開發的時候發現有錯誤,到網上查了下發現要從低版本裝到高版本(自己應該想到的T_T),於是把兩個都卸了,從VS2005開始裝,VS2005 SP,VS2

Command "python setup.py egg_info" failed with error code 1 in C:\Users\w5659\AppData\Local\Temp\pip-install-t7uomu4r\xa dmin\

Error msg: C:\Users\w5659>pip install xadmin Collecting xadmin Using cached https://files.pythonhosted.org/packages/1d/e9/2ac160c532d0d462142fa90a

安裝Scrapy遇到Comand"c:\users\lenovo\appdata\local\programs\python\python35\python.exe

電腦一直在爆下面這一堆的資訊 Command”c:\users\lenovo\appdata\local\programs\python\python35\python.exe -u -c “import setuptools, tokenize;fil

上週程式執行好好的,這週一上班客戶端程式出現該問題:Could not find file 'C:\Users\XX\AppData\Local\Temp\

詳細錯誤如下: 異常資訊(異常型別:System.IO.FileNotFoundException) 異常提示:檔案載入異常,請聯絡管理員處理 異常資訊:Could not find file 'C:\Users\yanshuqiang\AppData\Local\Temp

Error:The SDK directory '/Users/AhmadMusa/Desktop/[PROJECT PATH]/D:\Android\sdk' does not exist. Ple

使用android studio,匯入別人開源的專案,build的時候,老是報這個錯誤: Error:The SDK directory 'D:\sdk' does not exist. Please fix the 'sdk.dir' property in the lo

android studio run 的時候,報the apk file does not exist on disk,

bsp mage gpo 重啟 build log nbsp oid alt 1.首先 clean rebuild,重啟,不能解決的話,再找到這個 然後是這裏: 不用填,點ok,ok即可,他喵的,卡我倆小時 android studio run 的時候,報the a

Error:Cannot run program "D:\JDK\bin\java" (in directory "C:\Users\Administrator\.IntelliJIdea2017.3

安裝IDEA之後執行一直報這個錯誤,今天又下了一個JDK10安裝在C盤預設安裝位置,然後就可以執行IDEA了 懷疑這個問題的原因可能如下: 1.原來的JDK版本會不會是32位的(好像是64位的)

Error:Can't load library: C:\Users\Administrator.gradle\native\23\windows-i386\native-platform.dll

Error:Can’t load library: C:\Users\Administrator.gradle\native\23\windows-i386\native-platform.dll 解決方法: stackoverflow 上找到以下方法可行

Android 修改名無法執行activity class does not exist

最近在做馬甲包,將原包複製後,在AS中修改了包名,結果執行時提示activity class does not exist,主activity不存在,我看了錯誤資訊,發現主activity路徑之前還存在著原包的路徑,clean,rebuild都沒有效果 後來將gradl

react-native run-android Starting: Intent Error type 3 Error: Activity class does not exist

gradle 問題 exist native pack details .net 容易 安卓 使用”react-native run-android”命令運行android應用時,如果常常出現如下錯誤: Starting the app (/home/xxx/soft/

C# the SystemParameters, “type or namespace does not exist

ctu forms log bound question gpo sharp color project the SystemParameters, “type or namespace does not exist” 解決方法 * add a project refer

Android 7.0以上系統獲取以content開頭的檔案拿不到正確路徑,報錯column-data-does-not-exist

我們專案的使用場景,手機qq開啟檔案,選擇其他開啟方式,選擇我們自己的應用開啟,通過intent.getData()獲取檔案地址,後來發現在Android7.0之後的版本,獲取到的地址不正確,說檔案不存在。日誌報錯column-data-does-not-exist, 經過一天的折騰,終於在網上

Angular使用ng build打包報錯 Property 'setControl' does not exist on type 'AbstractControl'.解決方法

在專案打包出現setControl報錯解決方法: 對於用setControl設定多層級表單的值的用法,會出現這個報錯: 以下是正確的寫法: get services(): FormArray { return this.sltForm.get("Service") as Form

在 Jenkins 中,使用 maven 打包報 package xxx does not exist 問題的解決方法

1 發現問題 今天打算使用 Jenkins 給一些舊專案打包,編譯時報以下錯誤: ... [ERROR] /var/lib/jenkins/workspace/fsti-pipe/src/main/java/com/fsti/oss/service/sy

Jetty啟動時報class "javax.servlet.HttpConstraintElement"'s signer information does not match的原因

最近在支援一個專案,因為原來的組撤出來了,因此交接的不是很全面,很多問題找不到人問,只能自己查。今天在啟動工程的時候啟動失敗,丟擲: Exception in thread "main" java.lang.SecurityException: class "javax.s

除錯SPI通訊時報“The initial(idle) state of CLK line does not match the settings”錯誤

最近在除錯STM32F103VCT6的SPI讀寫Flash時報“The initial(idle) state of CLK line does not match the settings”錯誤。剛開始以為是SPI CLK的BaudRatePrescaler這個數太小,導致

AVD模擬器再次執行提示Could not open 'C:\Users\Shinelon\.android\avd\1.avd/cache.img':

執行一個app,再次開啟返回錯誤 -drive if=none,index=1,id=cache,file=C:\Users\LDY.android\avd\AVD_for_Nexus_7_2012_by_Google.avd/cache.img: could

ReactNative android C:\Users\60186\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\0f5

最近Studio升級到3.0 後,新建一個專案,什麼都沒有新增就報錯,煩都煩死了錯誤日誌如下:C:\Users\Administrator\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.1.0.aar\6a8b09