java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationExceptio

TaLinBoy 2016-12-20 11:57:20
问题:
Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug]
Error:trouble processing "javax/xml/XMLConstants.class":
Error:Ill-advised or mistaken usage of a core class (java.* or javax.*)
Error:when not building a core library.
Error:This is often due to inadvertently including a core library file
Error:in your application's project, when using an IDE (such as
Error:Eclipse). If you are sure you're not intentionally defining a
Error:core class, then this is the most likely explanation of what's
Error:going on.
Error:However, you might actually be trying to define a class in a core
Error:namespace, the source of which you may have taken, for example,
Error:from a non-Android virtual machine project. This will most
Error:assuredly not work. At a minimum, it jeopardizes the
Error:compatibility of your app with future versions of the platform.
Error:It is also often of questionable legality.
Error:If you really intend to build a core library -- which is only
Error:appropriate as part of creating a full virtual machine
Error:distribution, as opposed to compiling an application -- then use
Error:the "--core-library" option to suppress this error message.
Error:If you go ahead and use "--core-library" but are in fact
Error:building an application, then be forewarned that your application
Error:will still fail to build or run, at some point. Please be
Error:prepared for angry customers who find, for example, that your
Error:application ceases to function once they upgrade their operating
Error:system. You will be to blame for this problem.
Error:If you are legitimately using some code that happens to be in a
Error:core package, then the easiest safe alternative you have is to
Error:repackage that code. That is, move the classes in question into
Error:your own package namespace. This means that they will never be in
Error:conflict with core system classes. JarJar is a tool that may help
Error:you in this endeavor. If you find that you cannot do this, then
Error:that is an indication that the path you are on will ultimately
Error:lead to pain, suffering, grief, and lamentation.
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
Information:BUILD FAILED
Information:Total time: 41.772 secs
Information:34 errors
Information:0 warnings
Information:See complete output in console


____________________________________________________________
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.lin_ling.xmlapplication"
minSdkVersion 17
targetSdkVersion 25
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "8g"
}
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}

}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'

})
compile 'com.android.support:appcompat-v7:25.0.0'
testCompile 'junit:junit:4.12'
compile 'org.apache.poi:poi-ooxml:3.16-beta1'
compile 'org.apache.poi:poi-ooxml-schemas:3.16-beta1'
}


请问谁能帮我解答一下吗,我该如何做?
...全文
1199 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
请问解决了吗?

80,351

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧