I have the same problem. I followed @Amira Elsayed Ismail's recommendation and was demoted to 2.3.3
The building error disappeared, but I got a new wired warning. Warning:Ignoring Android API artifact com.google.android:android:4.1.1.4 for release . After a long search, I knew that this error occurs because one of my dependencies in the project depends on com.google.android:android, which means that this dependency directly declared a dependency on the Android version.
I need to know which of my dependencies is causing this warning. I tried to comment on the dependencies one by one in the \ build.gradle application and build the project.
In my case, when I deleted this package, compile 'com.sematext.android:sematext-logsene:1.0.0' project built without any errors.
Now we have found a package that depends on the version of android inside, we must eliminate this internal dependency for the version of Android.
I changed compile 'com.sematext.android:sematext-logsene:1.0.0' to
compile ('com.sematext.android:sematext-logsene:1.0.0'){ exclude group: 'com.google.android' }
Now everything is working fine; but I am still using the OLD version of gradle. I went back to app \ build.gradle and brought the gradient version back to 3.0.1
Now I fixed the problem and still used the last degree.
source share