i started little project in android studio debugging , fine, hour ago, got error, "r" can not resolved, can't reference layouts anymore. searched on web , here on stackoverflow, no solution seemed work me. tried cleaning project got error during gradle building:
error:execution failed task ':app:processdebugresources'. > com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\users\admin\appdata\local\android\sdk\build-tools\23.0.2\aapt.exe'' finished non-zero exit value 1
does know solution this? never happened me before , there's no need of linking me existing thread, because i've read threads related topic on here , noone able me. in advance
build gradle console: executing tasks: [:app:assembledebug]
configuration on demand incubating feature. :app:prebuild up-to-date :app:predebugbuild up-to-date :app:checkdebugmanifest :app:prereleasebuild up-to-date :app:preparecomandroidsupportappcompatv72311library up-to-date :app:preparecomandroidsupportdesign2311library up-to-date :app:preparecomandroidsupportrecyclerviewv72311library up-to-date :app:preparecomandroidsupportsupportv42311library 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 up-to-date :app:processdebugmanifest up-to-date :app:processdebugresources failed failure: build failed exception. * went wrong: execution failed task ':app:processdebugresources'. > com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\users\admin\appdata\local\android\sdk\build-tools\23.0.2\aapt.exe'' finished non-zero exit value 1 * try: run --stacktrace option stack trace. run --info or --debug option more log output. build failed total time: 1.51 secs
r can't resolved in android studio happened reasons:
- when face code problem in .xml file
- any theme chosen/build problem in android manifest file
solutions:
- look, if don't write code in xml file click rebuild or make project button or clean button. problem may solved.
- if modify xxxxx.xml layout file these files , i'm sure you've written wrong code. theme name problem, referencing problem of strings, dimens, colors , on. correct them , may r can't resolved text solved. obviously, after doing click make project button , provably no error..
my same problem of 2 given below: styles.xml file was:
<style name="mycustomtoolbar" parent="themeoverlay.appcompat.light"> <item name="colorprimary">#5974ab</item> </style>
and in xml file i've written that
<?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.toolbar xmlns:android="http://schemas.android.com/apk/res/android" .... android:popuptheme="@style/mycustomtoolber" > </android.support.v7.widget.toolbar>
look in xml
android:popuptheme="@style/mycustomtoolber"
i've typed wrong style name , got error r can't resolved.
Comments
Post a Comment