0

I am a beginner studying, so be certain the apps I am working on are not overly complicated, just basic experimenting apps.

I keep getting the same error today across different apps I am working on: Execution failed for task ':app:compileDebugKotlin'.

I definitely had a update for kotlin in studio today. Could it be an issue with the update? Is anyone else experiencing the same? I have no idea how to fix it.

Android doesn't mark any errors in my code, and I've made sure that the dependencies in the build.gradle are the latest version (not sure if that would've been an issue but it was highlighted as an issue so I've synced it).

khushbu vadi
  • 391
  • 2
  • 10
Tsabary
  • 3,119
  • 2
  • 24
  • 66
  • Cleaning your project and run again will probably reveal the error message – Bach Vu Feb 11 '19 at 09:59
  • Can you post your project-level and app-level `build.gradle` ? – Chintan Soni Feb 11 '19 at 10:00
  • have you enabled androidx and jetifier in your project? – karan Feb 11 '19 at 10:00
  • Try this https://stackoverflow.com/a/50446916/9868485 – code4rox Feb 11 '19 at 10:03
  • @ChintanSoni is this it? buildscript { ext.kotlin_version = '1.3.21' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } – Tsabary Feb 11 '19 at 10:28
  • @KaranMer not knowingly, could I have by accident? Is that a bad thing or would that might offer a solution? – Tsabary Feb 11 '19 at 10:28
  • you need to enable it if you want to use new architecture components – karan Feb 11 '19 at 10:32
  • add this `android.useAndroidX=true android.enableJetifier=true ` to your gradle.properties file then clean and build your projec.t – karan Feb 11 '19 at 10:32
  • @BachVu a rebuild didn't solve it – Tsabary Feb 11 '19 at 10:36
  • @KaranMer I have and unfortunately after a rebuild I got the same error – Tsabary Feb 11 '19 at 10:36
  • Is there something I can provide so everyone can see what I see? Should I push the whole thing up to GitHub? The main reason I am extremely annoyed by this is that I've been getting that same error on 3 different apps I've been working on. Is it that far fetched to think something in the update was bad? Or is the error completely irrelevant to whatever the update might have been? – Tsabary Feb 11 '19 at 10:37
  • 1
    can you post the complete error log? – karan Feb 11 '19 at 10:39
  • @KaranMer extremely sorry- everyone else as well. After you've asked for the error log, I went to copy it and saw something I've missed before the indicated where my mistake was. Not seeing it and not seeing any red lines under any file names in the tree I assumed that the code itself had no errors (I thought the red lines should always be there when an error exists). Thanks for trying to help guys, it is solved. – Tsabary Feb 11 '19 at 10:49
  • post what you resolved as an own answer. It might be helpful to future users. – karan Feb 11 '19 at 10:51

1 Answers1

0

RESOLVED: beginners mistake I have missed an indication in the build log to where my mistake was. I had unresolved references in my code to a fragment that was deleted.

Tsabary
  • 3,119
  • 2
  • 24
  • 66