1. Add ` useLibrary 'org.apache.http.legacy' `

 

修改 build.gradle android {} 內增加  useLibrary 'org.apache.http.legacy' 這一行. 
 

android {
    ...
    useLibrary 'org.apache.http.legacy'
    ...
}
...

 

2. Add ` compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' `

 

如果出現問題, 請將 useLibrary 'org.apache.http.legacy' 這一行 mark 起來. dependencies {} 內 增加 compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' 這一行. 
 

...
dependencies {
    ...
    compile 'com.android.support:support-v4:18.0.0'
    //compile files('libs/framework_debug.jar')
    //compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    ...
}
...

 

3. Sync Now

 

每一次修改 build.gradle 完後. AndroidStudio 會提示 "gradle files have changed since last project sync" . 請按一下 "Sync Now" . 

 

 

 

 

 

 

 

文章標籤
全站熱搜
創作者介紹
創作者 Lexra 的頭像
Lexra

Lexra Pixnet

Lexra 發表在 痞客邦 留言(0) 人氣(112)