分享

一个异常与Android Studio系列教程参考

 就这样了__ 2016-09-10

由于编译过程中遇到了错误:

报错信息:

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:processDebugResources
AGPBI: {"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":""}


 FAILED

FAILURE: 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 FAILED

Total 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./?/explore/category-studio


Gradle Plugin Samples (一):http://ask./?/article/25


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


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


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


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


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


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

 

遇到问题,不要放弃,一定要解决它!加油!

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

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多