Comments (16)
I have the same problem.
Gradle 2.1.2
from gradle-download-task.
I think the issue is caused by JDK Version. I am using 1.79
from gradle-download-task.
I tried adding this to the dependencies:
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.4.1'
I get a warning that it may conflict with Android's internal library. When building, I get a java.lang.NoSuchFieldException
for INSTANCE
.
from gradle-download-task.
Interesting. I haven't had this problem before. @scottdermott please use the workaround from @MarinKacaj for the time being. I'll look into the issue and try to fix it in the meantime.
from gradle-download-task.
Just to be on the safe side: can you send me a minimum example build.gradle demonstrating the error, so I can reproduce it? Thanks!
from gradle-download-task.
build.zip
This is the app module level build.gradle.
I'm using:
- Android Studio 2.1.2.
- JRE: 1.8.0_65-b17 amd64
- Windows 10
Hope this helps.
P.S.: Inside build.gradle replace "whatever" as appropriate with your test URLs, names, etc. Thank you.
from gradle-download-task.
Thanks for the build file. However, it's not a minimal example. It's a rather complex one. I wasn't able to get it running. Can you try to reproduce the error without all the Android stuff? Thanks for your support.
from gradle-download-task.
Getting the same here what are you missing for fixing this?
from gradle-download-task.
It would be perfect if I could reproduce it. It works in all of my build files. If I can't reproduce it I can't fix it, unfortunately. :-/
from gradle-download-task.
Hmm my problem was that I declared everything in a subproject. When I moved everything to the root build.gradle file everything works now. Weird :/
from gradle-download-task.
I can confirm, by moving download tasks to the root build.gradle this resolves the issue.
It appears that if the Android gradle plugin is applied within the same build.gradle
apply plugin: 'com.android.application'
The issue is present
from gradle-download-task.
Interesting. Thanks for posting your solution (i.e. workaround). Let me know if there is anything I can do in gradle-download-task to mitigate this issue. But I suspect it has probably something to do with the way how Gradle manages plugin classpaths.
from gradle-download-task.
Yes, By moving the dependency 'de.undercouch:gradle-download-task:3.1.1' to root build.gradle solve this problem.
from gradle-download-task.
@MarinKacaj I met the same problem, have you fixed it?
@michel-kraemer moving dependency to the top level build.gradle did not fix my problem. I have a buildSrc
project, which use android gradle transform API, i.e. the android gradle plugin, which dependency httpclient 4.1.1, but gradle-download-task plugin use httpclient 4.5.2. I think this is the core reason, when building, gradle use the former version, not the higher version, why ?
in order to override the dependency, I need to declare a higher version of httpclient in my buildSrc
project:
dependencies {
compile localGroovy()
compile gradleApi()
//override httpclient dependency of com.android.tools.build:gradle:2.2.3
compile 'org.apache.httpcomponents:httpclient:4.5.2'
compile 'com.android.tools.build:gradle:2.2.3'
}
after that, build successful. hope this helpful to some one.
from gradle-download-task.
Please follow #75. I think it's the same issue. I'm trying to reproduce it and find a solution. I'll post updates in the other thread as this one is already closed.
from gradle-download-task.
@PashaTurok Please open a new issue instead of commenting on an old one. Please also include the version of gradle-download-task you are using. Thanks.
from gradle-download-task.
Related Issues (20)
- Could not find method src() on extension 'download' HOT 2
- Download Task with Private Repo HOT 5
- Explicit file naming for src property HOT 1
- Only if Modified Recipe to then run Zip or other methods HOT 6
- Documentation unclear about `useETag` HOT 2
- Does plugin support to download file from local a relative file? HOT 6
- Configuration-cache-safe use of download and verify extensions HOT 14
- Problems when use with Kotlin Gradle Plugin 1.7.20 HOT 10
- responseInterceptor missing HOT 3
- Support progress bar when executing task via IntelliJ HOT 1
- How to send Post Body Parameter (data) HOT 4
- Downloading from Internal Repo using Token HOT 10
- untar and unxz HOT 1
- SSLPeerUnverifiedException jfrog-prod-usw2-shared-oregon-main.s3.amazonaws.com HOT 7
- query parameters in src url HOT 2
- Download plugin doesn't encoded files HOT 2
- Allow `src` to take `URI` objects HOT 1
- Cached download should be ignored if URL changes HOT 4
- Can download task add new property to avoid directly throw exception? HOT 7
- Bad request after redirect HOT 15
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-download-task.