0

I've tried uninstalling and reinstalling Android Studio multiple times and it seems that something IN THE PROJECT became corrupt so when I try it on a 'fresh install' it resurfaces.

I know it's Gradle but I don't know how to fix it. I have searched and searched the web for a solution and couldn't find anything specific to this error. Thanks, everyone! Help a newbie out!

Error:error: style attribute 'attr/colorPrimary (aka com.example.timm.baptist02:attr/colorPrimary)' not found. Error:(105) style attribute 'attr/colorPrimary (aka com.example.timm.baptist02:attr/colorPrimary)' not found. Error:resource style/TextAppearance.AppCompat (aka com.example.timm.baptist02:style/TextAppearance.AppCompat) not found. Error:resource style/Base.Theme.AppCompat.Dialog.FixedSize (aka com.example.timm.baptist02:style/Base.Theme.AppCompat.Dialog.FixedSize) not found. Error:resource style/Base.Theme.AppCompat.Light.Dialog.FixedSize (aka com.example.timm.baptist02:style/Base.Theme.AppCompat.Light.Dialog.FixedSize) not found. Error:resource style/Base.V7.Theme.AppCompat.Dialog (aka com.example.timm.baptist02:style/Base.V7.Theme.AppCompat.Dialog) not found. Error:resource style/Base.V7.Theme.AppCompat.Light.Dialog (aka com.example.timm.baptist02:style/Base.V7.Theme.AppCompat.Light.Dialog) not found. Error:resource style/Base.V7.ThemeOverlay.AppCompat.Dialog (aka com.example.timm.baptist02:style/Base.V7.ThemeOverlay.AppCompat.Dialog) not found. Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

BEingprabhU
  • 1,618
  • 2
  • 21
  • 28

1 Answers1

0

First of all if you are using gradle 3, did you open gradle.properties adding this line, and compile again?

android.enableAapt2=false

Also you should refer to this post that explains how to get rid of this error due to the Gradle 3 migration.

trocchietto
  • 2,607
  • 2
  • 23
  • 36
  • I put that line in gradle.properties. No change. Reading the post you mentioned. Thank you so much! – Timm Taylor Jan 27 '18 at 18:07
  • how is now, is solved the problem withe the post? did you update the libraries as mentioned? do you have a new error message? If yes please add an EDIT in your post without cancelling the previous content. Please let me know if works accept my response – trocchietto Jan 28 '18 at 18:11
  • Still not working. I read the link you provided and all the gradle files look like they are supposed to (version-wise). I disabled Aapt2 (false), cleaned the project then rebuilt the project and still the problem persists. – Timm Taylor Feb 01 '18 at 14:58
  • is exactly the same message error? try to "invalidate the cache" – trocchietto Feb 01 '18 at 18:38
  • How do you 'invalidate the cache'? Never mind! Sorry to bother. I just found instructions here on Stackoverflow. – Timm Taylor Feb 01 '18 at 20:13
  • you press File on the bar above in android studio and you find the option, but please let me know if the error message you posted is exactly the same you are obtaining now, then let me know. Also REALLY IMPORTANT the link I sent you suggest to update the support libraries, did you do? – trocchietto Feb 01 '18 at 20:51
  • Thanks to folks who tried to help with this. Fortunately, I back everything up after every successful activity. I ended up rebuilding the product from my archives and simply cut and pasted into a 'fresh' install. A word to the wise, archive often. Thanks again to trocchietto.I tried all your suggestions and nothing fixed the old problem. – Timm Taylor Feb 08 '18 at 13:44