Resolves Android 6.0 (api) SDK, no longer available org.apache.http.*
Last Update:2015-10-20
Source: Internet
Author: User
<span id="Label3"></p><p><p>Resolves Android 6.0 (api) SDK, no longer available org.apache.http.*</p></p> <blockquote> <blockquote> <p style="margin-top: 0px; margin-bottom: 0px; padding: 0px; box-sizing: border-box; line-height: 1.25;">When using android-async-http, my APL was updated to 23, and my build version was 23, and Org.apache.http.Header this class was not found, because in API 23, Org.apache.http.* not available (only a few classes are reserved)</p> </blockquote> </blockquote> <span id="OSC_h4_1"><span id="OSC_h4_1"></span></span>Android Studion workaround:<pre class="prettyprint prettyprinted"><pre class="prettyprint prettyprinted">Android {uselibrary ' Org.apache.http.legacy '}</pre></pre> <ul> <ul> <li><p>Complete as shown below</p></li> </ul> </ul> <p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);"></p></p> <p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);"><br></p></p> <p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 1.1em; padding: 0px; box-sizing: border-box; color: rgb(85, 85, 85); font-family: ‘microsoft yahei‘; font-size: 14px; line-height: 35px; white-space: normal; background-color: rgb(255, 255, 255);">Resolution Gradle DSL Method not found: ' Uselibrary () '</p></p> <p style="margin-top: 0px; margin-bottom: 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; line-height: 19.5px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; line-height: 19.5px; white-space: normal; background-color: rgb(255, 255, 255);">Change:</p></p> <pre class="default prettyprint prettyprinted"><pre class="default prettyprint prettyprinted">Classpath ' com.android.tools.build:gradle:1.0.0 '</pre></pre> <p style="margin-top: 0px; margin-bottom: 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; line-height: 19.5px; white-space: normal; background-color: rgb(255, 255, 255);"><p style="margin-top: 0px; margin-bottom: 1em; padding: 0px; border: 0px; font-size: 15px; clear: both; color: rgb(34, 34, 34); font-family: ‘Helvetica Neue‘, Helvetica, Arial, sans-serif; line-height: 19.5px; white-space: normal; background-color: rgb(255, 255, 255);">To:</p></p> <pre class="default prettyprint prettyprinted"><pre class="default prettyprint prettyprinted">Classpath ' com.android.tools.build:gradle:1.3.0 '</pre></pre> <p><p><br></p></p><p><p>Resolves Android 6.0 (api) SDK, no longer available org.apache.http.*</p></p></span>