NoSuchFieldError - > BasicHeadValueFormatter.INSTANCE Android Studio

时间:2015-05-19 22:54:08

标签: android apache android-studio

由于某种原因,我收到以下错误。我看到有关于此的多篇帖子,但我无法找到解决方案。我在android中的libs文件夹中有http文件。我知道依赖项中的第一行编译它们,但我也在项目结构中手动添加它们,因为我认为它可以解决问题。到目前为止没有运气。

private Object _selectedComboBoxProperty;
public Object SelectedComboBoxProperty 
{
   get { return _selectedComboBoxProperty; }
   set { 
       _selectedComboBoxProperty = value;

       // Notify property changed
       OnPropertyChanged("SelectedComboBoxProperty");

       // Update Datagrid_1
       UpdateResults();
}

private void UpdateResults()
{
   // Inspect the current values of your selection properties

   // Some business logic to filter the results


   // Refresh the collection bound to the Datagrid_1

}

我的依赖关系是:

Caused by: java.lang.NoSuchFieldError: org.apache.http.message.BasicHeaderValueFormatter.INSTANCE

这一行会导致它:dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.0.0' compile 'info.hoang8f:fbutton:1.0.5' compile files('libs/httpmime-4.4.1.jar') compile files('libs/httpcore-4.4.1.jar') compile files('libs/httpclient-4.4.1.jar') }

1 个答案:

答案 0 :(得分:0)

对于其他遇到同样问题的人:

我通过下载旧文件解决了这个问题。

这就是我现在依赖的内容:

compile files('libs/httpclient-4.3.6.jar')
compile files('libs/httpcore-4.3.3.jar')
compile files('libs/httpmime-4.3.6.jar')
相关问题