Why Warning:Unable to find optional library: org.apache.http.legacy occurs?

前端 未结 5 1926
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 07:26

My gradle file:

apply plugin: \'com.android.application\' 

android { 
  useLibrary \'org.apache.http.legacy\' 
  compileSdkVersion 23 
  buildToolsVersion \         


        
5条回答
  •  天涯浪人
    2020-12-08 07:34

    Why? If you use Android Studio on Windows then optional.json file should be not only in \Program Files (x86)\...\platforms\android-23\optional\ .

    So: go to Android Studio Settings -> Appearence & Behavior -> System Settings and look for Android SDK Location, copy (or create) optional.json in corresponding folder. Or just edit Android SDK Location to \Program Files (x86)\...

    In my case Android SDK Location was C:\Users\Usernade\AppData\Local\Android\sdk and there was no optional.json file.

提交回复
热议问题