Build failed - Cause: entry

Hi folks - I've just come back to this project after a break and thought I'd start again with a fresh clone of the current project repo. But when I Build or Run, Android Studio (fully updated) just returns:

Build: failed
Cause: entry

This looks like it should be something really simple, but I'm not experienced with AS and don't know where to start fixing it - any ideas?
Thanks
Nik

Would you be able to post a screenshot of what you're seeing? The error you're describing doesn't give much away.

Fair point - apologies! But the message doesn't give much away either. :slight_smile:

Thanks, Nik

Could you try reimporting the project and make sure Android Studio has synced with the gradle files. That error is really confusing - Android Studio pretty much makes setup plug and play unless something is very broken on your local machine.

Thanks for the suggestion. I cloned the project into a new folder, opened it in Android Studio, and got exactly the same message on trying a build.
My understanding of gradle is 'undefined' :slight_smile: - so I don't know what you mean by "make sure Android Studio has synced with the gradle files" - please could you elaborate, ideally with step-by-step instructions?
In case it's useful -
1: when I load the project in AS, the Build output reports "Project setup: successful".
2: if I Clean the project, the Build output reports "Build successful".
3: But when I Make or Run, the Build fails, with output is as my screenshot.

FYI I'm running this on a linux Mint x64 box, fully updated as far as I know.

Grateful for any help, this is quite worrying!

Thanks, Nik

When you click on Build failed (one line above) not on Cause Entry you should get more info what went wrong. Please share it.

When I first opened the cloned project, AS suggested that I upgrade the Gradle plugin from v3.5.3 to 3.6.1, and Gradle itself to v5.6.4. So I did. The Build errors I've reported then occurred.
So I just tried again without upgrading any of the Gradle stuff, and the project builds fine. Then I re-cloned it and upgraded the Gradle stuff again, and the build failed as before.
@Grzesiek2010 - thanks for your suggestion, this does indeed reveal more info:

Executing tasks: [:collect_app:assembleDebug] in project /home/nik/test/collect

> Task :collect_app:preBuild UP-TO-DATE
> Task :collect_app:preDebugBuild UP-TO-DATE
> Task :collect_app:compileDebugAidl NO-SOURCE
> Task :collect_app:generateDebugBuildConfig
> Task :collect_app:compileDebugRenderscript NO-SOURCE
> Task :collect_app:javaPreCompileDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':collect_app:javaPreCompileDebug'.
> Could not resolve all files for configuration ':collect_app:debugCompileClasspath'.
   > Failed to transform file 'nbi-stubs-1.0.0.aar' to match attributes {artifactType=android-classes, org.gradle.usage=java-api}
      > Execution failed for AarToClassTransform: /home/nik/.gradle/caches/transforms-2/files-2.1/55819e8a03778985b5116304fc094d03/jetified-nbi-stubs-1.0.0.aar.
         > entry 

So for once I guess the answer is to refuse to upgrade when I'm told it's a good idea. :slight_smile:
I don't understand Gradle at all, but it does seem to cause a lot of problems. But as long as I keep ignoring the upgrade suggestion, at least I can work!
Thanks all for your help.
Nik

Yes I can reproduce the issue and the solution is as you have noticed keeping the original versions of gradle/gradle plugin. I'll take a deeper look an try to fix.