I implemented the library in my project and faced such a situation, in order for it to work and not crash it was necessary to change the version of android.tools to a lower one. I had this default

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

and until I changed it to just such (down)

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

I got this error

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

if the old version is 1.2.3, then everything works, and when I put 1.5.0, it doesn't work ...

Why is this so? What if I want to use newer versions?

    1 answer 1

    Solution from the category of the obvious, you need to use a newer version, not the old one. "So that it works and does not crash, it was necessary to change the version of android.tools to a lower one." I strongly doubt that this is the right solution to the problem.

    • So there is just the opposite ... According to my question, it says that if the old version is 1.2.3, then everything works, and when I put 1.5.0, it does not work ... - Aleksey Timoshchenko
    • "I implemented the library into my project and faced such a situation, in order for it to work and not crash, you had to change the version of android.tools to a lower one." You read about it somewhere or at random determined that everything is fine on a reduced version. Think about it yourself, it works on the old version, but not on the new version, perhaps the problem is different, because usually new versions of something contain the old and something new and therefore the “something” old should also work - BORSHEVIK
    • I thought so too ... But in practice it turns out differently. I determined this by typing ... I am a newbie so I can understand something wrong ... But see for yourself what the situation is, I put version 1.5.0 shows an error, I put version 1.2.3 everything works ... What is the reason? - Aleksey Timoshchenko