I can't figure out why it's terminated. Errors and code shown below:
You need to put some configurations in your manifest:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
In the application entity of you xml file.