0
message:javac 1.8.0_172 was used to compile java sources
error:java: 
Inaccessible org.apache.http.annotation.NotThreadSafe
Can not found class file of org.apache.http.annotation.NotThreadSafe

C:...\common\HttpUtils.java 
warn:java:
org.apache.http.impl.client's org.apache.http.impl.client.DefaultHttpClient is obsolete

Thanks in advance. I am searching for a long time on the net. But no use. Please help or try to give some ideas how to achieve this.

xiane
  • 33
  • 1
  • 5

3 Answers3

0

Solution can be found here for the error.

DefaultHttpClient is deprecated, you can this solution here to import the Java HttpClient.

Community
  • 1
  • 1
0

According to this the @NotThreadSafe annotation should be replaced with @Contract (threading = org.apache.http.annotation.ThreadingBehavior.UNSAFE) which uses org.apache.http.annotation.Contract.

Erica Kane
  • 3,137
  • 26
  • 36