Butterknife: Error:cannot access ThreadSafe

Created on 6 Mar 2015  Â·  3Comments  Â·  Source: JakeWharton/butterknife

When I try to import roboguice into my build.gradle dependencies, the project build fails with :

Error:cannot access ThreadSafe
class file for org.apache.http.annotation.ThreadSafe not found
Error:Execution failed for task ':app:compileDebugJava'.
Compilation failed; see the compiler error output for details.
Information:BUILD FAILED

Any ideas?

Most helpful comment

No idea... But I solved today my problem by adding :
compile 'org.apache.httpcomponents:httpcore:4.4'
into my build.gradle...

All 3 comments

How it is associated with ButterKnife?

Q: Any ideas?
A: May be Roboguice requires org.apache.http.annotation and you need to add it to dependencies

No idea... But I solved today my problem by adding :
compile 'org.apache.httpcomponents:httpcore:4.4'
into my build.gradle...

ThreadSafe is a compile time annotation which was deprecated in later versions of httpcore. Add it to your mvn dependency with compile scope to resolve the issue.

Was this page helpful?
0 / 5 - 0 ratings