Fixed
Status Update
Comments
uc...@google.com <uc...@google.com> #2
can you share a sample project to reproduce this issue
al...@google.com <al...@google.com>
mi...@gmail.com <mi...@gmail.com> #3
sure. here's a sample project with the dependency added.
xa...@google.com <xa...@google.com> #4
So what happens is that httpclient should not be used as is on Android because Android internally has some httpclient APIs already. A few releases ago this was deprecated but the classes are still on the platform, so depending on it means that you are going to have collision between the platform classes and yours.
In plugin 1.x and 2.x we detected this and output a good error message. We don't anymore because of how Gradle's API are (even though we set an error, it's not showing anywhere.)
even running
gradle app:depIns --configuration debugCompileClasspath --dependency org.apache.httpcomponents:httpclient:4.3.6
does not show the error message which is terrible.
I'm wondering if we should replace this with a lint error.
In plugin 1.x and 2.x we detected this and output a good error message. We don't anymore because of how Gradle's API are (even though we set an error, it's not showing anywhere.)
even running
gradle app:depIns --configuration debugCompileClasspath --dependency org.apache.httpcomponents:httpclient:4.3.6
does not show the error message which is terrible.
I'm wondering if we should replace this with a lint error.
tn...@google.com <tn...@google.com> #5
Xav wants us to fix this in 3.0 as a new lint warning; treating as a bug rather than a new feature since it replaces a missing error message from 2.0.
xa...@google.com <xa...@google.com> #6
Tor and I chatted and we're going to move away from a custom resolution strategy to a lint error.
The dependencies that should be ignored are:
org.apache.httpcomponents:httpclient:*
xpp3:xpp3:*
commons-logging:commons-logging:*
xerces:xmlParserAPIs:*
org.json:json:*
org.khronos:opengl-api:*
The dependencies that should be ignored are:
org.apache.httpcomponents:httpclient:*
xpp3:xpp3:*
commons-logging:commons-logging:*
xerces:xmlParserAPIs:*
org.json:json:*
org.khronos:opengl-api:*
xa...@google.com <xa...@google.com> #7
oh we also need to reject com.google.android:android:*
xa...@google.com <xa...@google.com> #8
the error message for the first set (httpclient, ...) should be:
Conflicts with the internal version provided by Android. Please exclude it from your dependencies.
The error message for com.google.android:android:* should be:
This module is a copy of the android API provided by the SDK. Please exclude it from your dependencies.
Conflicts with the internal version provided by Android. Please exclude it from your dependencies.
The error message for com.google.android:android:* should be:
This module is a copy of the android API provided by the SDK. Please exclude it from your dependencies.
tn...@google.com <tn...@google.com> #9
Also according to Xav: we should do this only for runtime dependencies; if
they are compileOnly (provided) you don't care.
On Thu, Aug 31, 2017 at 10:50 AM, xav <buganizer-system+xav@google.com>
wrote:
they are compileOnly (provided) you don't care.
On Thu, Aug 31, 2017 at 10:50 AM, xav <buganizer-system+xav@google.com>
wrote:
xa...@google.com <xa...@google.com> #10
I removed the custom dependency resolution, so it'll work in beta5. I'm not sure the new lint check will make it for the same beta.
tn...@google.com <tn...@google.com> #11
Fix pending in ag/2839788 (and ag/2839711 for IDE side registration)
Description
AI-171.4294784, JRE 1.8.0_152-release-915-b01x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920x1080
The gradle project sync operation fails with an error:
Error:Failed to resolve: org.apache.httpcomponents:httpclient:4.3.6
Open File
Show in Project Structure dialog
However, org.apache.httpcomponents:httpclient:4.3.6 is available from jcenter, which I have in my repositories.
It should resolve to this.
I'm requesting some information on how to debug this problem with gradle project sync.
As requested, here are some versions of things that I'm using:
Gradle: 4.1
Android plugin: 3.0.0-beta3
Compile SDK: API 26: Android 8.0 (O)
Build tools: 26.0.1
Android SDK tools: 26.0.2