一個異常與Android Studio系列教程參考

來源:互聯網
上載者:User

標籤:

由於編譯過程中遇到了錯誤:

報錯資訊:

Error:(4, 6) No resource found that matches the given name: attr ‘style‘.

Error:Execution failed for task ‘:app:processDebugResources‘.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘D:\Program Files (x86)\DevTools\AndroidStudio\SDK\build-tools\22.0.1\aapt.exe‘‘ finished with non-zero exit value 1

另外Gradle Console的報錯資訊為:

Executing tasks: [:app:assembleDebug]Configuration on demand is an incubating feature.:app:preBuild UP-TO-DATE:app:preDebugBuild UP-TO-DATE:app:checkDebugManifest:app:preReleaseBuild UP-TO-DATE:app:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE:app:prepareComAndroidSupportSupportV42221Library UP-TO-DATE:app:prepareDebugDependencies:app:compileDebugAidl UP-TO-DATE:app:compileDebugRenderscript UP-TO-DATE:app:generateDebugBuildConfig UP-TO-DATE:app:generateDebugAssets UP-TO-DATE:app:mergeDebugAssets UP-TO-DATE:app:generateDebugResValues UP-TO-DATE:app:generateDebugResources UP-TO-DATE:app:mergeDebugResources:app:processDebugManifest UP-TO-DATE:app:processDebugResourcesAGPBI: {"kind":"ERROR","text":"No resource found that matches the given name: attr \u0027style\u0027.","sourcePath":"E:\\CodeSpace\\AndroidStudio\\DemoProject\\app\\src\\main\\res\\values\\styles.xml","position":{"startLine":4,"startColumn":6,"startOffset":58,"endColumn":11,"endOffset":63},"original":""} FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ‘:app:processDebugResources‘.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘D:\Program Files (x86)\DevTools\AndroidStudio\SDK\build-tools\22.0.1\aapt.exe‘‘ finished with non-zero exit value 1* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 3.447 secs

搜尋半天,更新SDK,甚至重新設定JAVA等,重啟電腦等,均為解決,查閱stackflow,發現文章講的都是廢話,都沒有實際解決。

只好重新在摸索,檢查原因。

一個錯誤引發的血案,太浪費時間了。

 

後來發現這些,還不錯,閱讀了一遍,覺得有些之後還會參考。引用如下:

史上最詳細的Android Studio系列教程一--下載和安裝:http://segmentfault.com/a/1190000002401964
史上最詳細的Android Studio系列教程二--基本設定與運行:http://segmentfault.com/a/1190000002411926
史上最詳細的Android Studio系列教程三--快速鍵:http://segmentfault.com/a/1190000002418983
史上最詳細的Android Studio系列教程四--Gradle基礎:http://segmentfault.com/a/1190000002439306
史上最詳細的Android Studio系列教程五--Gradle命令詳解與匯入第三方包:http://segmentfault.com/a/1190000002464822

另外,Android Studio官網上面有一些文章,現在去慢慢讀一遍。這些問題一定可以解決的。

Android Studio教程:http://ask.android-studio.org/?/explore/category-studio


Gradle Plugin Samples (一):http://ask.android-studio.org/?/article/25


Gradle Plugin Samples 之 Gradle Hello World (二) :http://ask.android-studio.org/?/article/26


Gradle Plugin Samples 之 Gradle Eclipse Compatible (三) :http://ask.android-studio.org/?/article/27


Gradle Plugin Samples 之Gradle Library Projects(四) :http://ask.android-studio.org/?/article/28


Gradle Plugin Samples 之 Gradle Build Variants(五):http://ask.android-studio.org/?/article/29


Gradle Plugin Samples 之 Gradle Build Variants(六):http://ask.android-studio.org/?/article/30


Gradle Plugin Samples 之 Gradle Unit Test(七) :http://ask.android-studio.org/?/article/44

 

遇到問題,不要放棄,一定要解決它!加油!

2015年7月25日20:23:09 於上海德州二村

 

一個異常與Android Studio系列教程參考

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.