android – Why is build: gradle: 1.5.0 showing error?

Question:

I implemented the library into my project and ran into such a situation, in order for it to work and not crash any errors, it was necessary to change the android.tools version to a downgraded one. I had this by default

classpath 'com.android.tools.build:gradle:1.5.0'

and until I changed it to this one (reduced)

classpath 'com.android.tools.build:gradle:1.2.3'

I got this error

Error:Cannot access first() element from an empty List

if the version is old 1.2.3 then everything works, but when I put 1.5.0 it does not work …

Why does this happen? What if I want to use new versions?

Answer:

The solution is obvious, you need to use a newer version, not an old one. "in order for it to work and not to crash any errors, it was necessary to change the android.tools version to a downgraded one." I strongly doubt that this is the correct solution to the problem.

Scroll to Top