2016-02-17 10 views
2

Я использую библиотеку Comriva для извлечения функций MFCC в мой проект распознавания речи. И я импортировал основные пакеты comriva в свой проект. Когда я устал, чтобы построить это им получать эту ошибку в Gradle,Ошибка сборки проекта Android javax/xml/stream/events/StartElement.class

Information:Gradle tasks [:app:assembleDebug] 
:app:preBuild UP-TO-DATE 
:app:preDebugBuild UP-TO-DATE 
:app:checkDebugManifest 
:app:preReleaseBuild UP-TO-DATE 
:app:prepareComAndroidSupportAppcompatV72220Library UP-TO-DATE 
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE 
:app:prepareComAndroidSupportRecyclerviewV72220Library UP-TO-DATE 
:app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE 
:app:prepareDebugDependencies 
:app:compileDebugAidl UP-TO-DATE 
:app:compileDebugRenderscript UP-TO-DATE 
:app:generateDebugBuildConfig UP-TO-DATE 
:app:generateDebugAssets UP-TO-DATE 
:app:mergeDebugAssets UP-TO-DATE 
:app:generateDebugResValues UP-TO-DATE 
:app:generateDebugResources UP-TO-DATE 
:app:mergeDebugResources UP-TO-DATE 
:app:processDebugManifest UP-TO-DATE 
:app:processDebugResources UP-TO-DATE 
:app:generateDebugSources UP-TO-DATE 
:app:processDebugJavaRes UP-TO-DATE 
:app:compileDebugJava UP-TO-DATE 
:app:compileDebugNdk UP-TO-DATE 
:app:compileDebugSources UP-TO-DATE 
:app:collectDebugMultiDexComponents UP-TO-DATE 
:app:packageAllDebugClassesForMultiDex UP-TO-DATE 
:app:shrinkDebugMultiDexComponents UP-TO-DATE 
:app:createDebugMainDexClassList UP-TO-DATE 
:app:dexDebug 
trouble processing "javax/xml/stream/events/StartElement.class": 
Ill-advised or mistaken usage of a core class (java.* or javax.*) 
when not building a core library. 
This is often due to inadvertently including a core library file 
in your application's project, when using an IDE (such as 
Eclipse). If you are sure you're not intentionally defining a 
core class, then this is the most likely explanation of what's 
going on. 
However, you might actually be trying to define a class in a core 
namespace, the source of which you may have taken, for example, 
from a non-Android virtual machine project. This will most 
assuredly not work. At a minimum, it jeopardizes the 
compatibility of your app with future versions of the platform. 
It is also often of questionable legality. 
If you really intend to build a core library -- which is only 
appropriate as part of creating a full virtual machine 
distribution, as opposed to compiling an application -- then use 
the "--core-library" option to suppress this error message. 
If you go ahead and use "--core-library" but are in fact 
building an application, then be forewarned that your application 
will still fail to build or run, at some point. Please be 
prepared for angry customers who find, for example, that your 
application ceases to function once they upgrade their operating 
system. You will be to blame for this problem. 
If you are legitimately using some code that happens to be in a 
core package, then the easiest safe alternative you have is to 
repackage that code. That is, move the classes in question into 
your own package namespace. This means that they will never be in 
conflict with core system classes. JarJar is a tool that may help 
you in this endeavor. If you find that you cannot do this, then 
that is an indication that the path you are on will ultimately 
lead to pain, suffering, grief, and lamentation. 
1 error; aborting 
Error:Execution failed for task ':app:dexDebug'. 
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 
Information:BUILD FAILED 
Information:Total time: 5.524 secs 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

Я не включал библиотеки XML до сих пор, как простой XML.

Это мой gradle.build файл,

apply plugin: 'com.android.application' 

android { 

    compileSdkVersion 22 
    buildToolsVersion "22.0.1" 

    defaultConfig { 
     applicationId "info.androidhive.sleepApp" 
     minSdkVersion 15 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
     // Enabling multidex support. 
     multiDexEnabled true 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    compile 'com.android.support:appcompat-v7:22.2.0' 
    compile 'com.android.support:recyclerview-v7:22.2.0' 
    compile files('libs/jl1.0.jar') 

    compile files('libs/commons-logging-api.jar') 
    compile files('libs/cp.jar') 
      compile files('libs/http-2.2.1.jar') 
      compile files('libs/jama-1.0.2.jar') 
      compile files('libs/jl1.0.jar') 
      compile files('libs/jogg-0.0.7.jar') 
      compile files('libs/lucene-analyzers-3.0.0.jar') 
      compile files('libs/lucene-core-3.0.0.jar') 
      compile files('libs/lucene-queries-3.0.0.jar') 
      compile files('libs/lucene-queryparser-3.0.0.jar') 
      compile files('libs/lucene-snowball-3.0.3.jar') 
      compile files('libs/jorbis-0.0.15.jar') 
      compile files('libs/mdsj.jar') 
      compile files('libs/tritonus_remaining.jar') 
      compile files('libs/tritonus_share.jar') 
      compile files('libs/wstx-lgpl-3.0.1.jar') 
      compile files('libs/weka-stable-3.6.13.jar') 
      compile files('libs/stax-api-1.0.jar') 
      compile files('libs/mp3spi1.9.4.jar') 
} 

Пожалуйста, помогите мне решить эту проблему.

ответ

1

Я понял, что это был файл stax-api-1.0.jar, который включал классы javax.xml.stream.events. * После удаления jar, я смог его успешно построить. Эта банка появилась вместе с comriva, поэтому я этого не заметил.