看板 AndroidDev 關於我們 聯絡資訊
身為一個as 0.1~0.5.8的使用者... 各種心酸誰人知阿~~ -- 其實volley是非必需的,對於新手寫android client來說 HttpURLConnection、HttpPost 這類常見的jdk、skd api 應該會更為親切 ※ 引述《yhn0tgb60 (呦厚厚)》之銘言: : 我是個開發的新手 第一次做app : 我是用 AndroidStudio + MacBookPro : 我現在在做 app要溝通server的功能 : client端 看到很多人都推薦用 volley 所以我當然就來用看看 : 應該是要安裝第三方Lib 而且要能開啟volley類型的Project : 我看到網路上都是 eclipse的教學 沒找到 AndroidStudio的教學 : 所以我就憑eclipse的教學 找看看AndroidStudio類似的地方 : 我的操作步驟是這樣 : VCS->Checkout from Version Control->Git : 填上 https://android.googlesource.com/platform/frameworks/volley : 下載檔案 和隨便找一個安裝路徑? : 我設定路徑是 /Applications/Android Studio.app/plugins/gradle : 接下來會到 Import Project from Gradle : 要設定 Gradle home : 其實我不懂這個設定是什麼意思 其實就跟設定JAVA_HOME ANDROID_HOME是一樣的 : 總之我也設定 /Applications/Android Studio.app/plugins/gradle : 結果顯示錯誤 : You are using an unsupported version of Gradle. Please use version 1.10. : Please point to a supported Gradle version in the project's Gradle : settings or in the project's Gradle wrapper (if applicable.) : Consult IDE log for more details (Help | Show Log) : 看來是要去更新 Gradle? : http://services.gradle.org/distributions : 我到這下載新版的 Gradle 但是卻不知道要怎麼 update..... 並不是update 而是要你下載1.10 這個版本 目前AS適用的gradle 版本 : 感覺好麻煩.... 這種更新的事情 怎麼沒有一鍵完成的功能..... 身為一個Developer ,怎麼可以一鍵完成(誤 : 另外我在 build release版時 也遇到 signed 的問題.... : Installation failed since the APK was either not signed, or signed incorrectly. 當你build debug版本的時候 ,會使用預設的debug key 不管在eclipse或是AS都是這樣 但是release 版本不能使用預設的debug key,你必須自己產生一個 請參考: Signing Your Applications http://developer.android.com/tools/publishing/app-signing.html : If this is a Gradle-based project, : then make sure the signing configuration is specified : in the Gradle build script. 如果這是一個由Gradle 管理的project,請你去設定 Gradle build script 告訴Gradle Project 你的憑證在哪裡,要用哪個鑰匙,密碼是多少 : 目前也還看不懂要怎麼解 : 怎麼會這麼麻煩勒 == 甚麼還不會 !? 來來來請服用 :) stackoverflow: http://ppt.cc/7aZr AS官方文件: http://ppt.cc/-G70 機於安全考量,設定憑證路徑這跟密碼(主要是這個!)我不會把他寫在build.gradle裡 在android studio: Build->Generate Signed APK 再輸入密碼就行了 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 220.135.37.235 ※ 文章網址: http://www.ptt.cc/bbs/AndroidDev/M.1401162436.A.3B0.html