我正在尝试使用Ionic和我执行时构建应用程序

离子cordova构建android

此外,我尝试了所有可能的方法来解决堆栈溢出下列出的这个问题,离子论坛仍然存在同样的问题

我收到如下错误 . 但是如果我执行离子cordova构建ios,相同的代码工作正常

我使用以下插件

<plugin name="cordova-plugin-console" spec="^1.0.7" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-document-viewer" spec="^0.9.3" />
    <plugin name="cordova-plugin-file-opener2" spec="^2.0.19" />
    <plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />

错误信息 :

✖运行命令 - 失败! [ERROR] Cordova遇到错误 . 您可以通过直接运行上面的Cordova命令获得更多洞察力 . [错误]运行cordova build android时出错(退出代码1):(截断)...:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - 不是增量的(例如输出已更改,之前没有执行,
等等 . ) .
注意:某些输入文件使用或覆盖已弃用的API .
注意:使用-Xlint重新编译:弃用以获取详细信息 .
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders
:CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:processReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:compileReleaseJavaWithJavac - 不是增量的(例如输出已更改,之前没有执行,
等等 . ) .
注意:某些输入文件使用或覆盖已弃用的API .
注意:使用-Xlint重新编译:弃用以获取详细信息 .
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareBarcodescannerLibrary
:prepareComAndroidSupportSupportCompat2600Alpha1Library
:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:prepareComAndroidSupportSupportFragment2600Alpha1Library
:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:prepareComAndroidSupportSupportV42600Alpha1Library
:prepareOrgApacheCordovaCordovaLib623DebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:compileDebugJavaWithJavac
:compileDebugJavaWithJavac - 不是增量的(例如输出已更改,之前没有执行等) .
注意:某些输入文件使用或覆盖已弃用的API .
注意:使用-Xlint重新编译:弃用以获取详细信息 .
:compileDebugNdk UP-TO-DATE
:compileDebugSources
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:transformClassesWithDexForDebug FAILED

FAILURE:构建因异常而失败 .

  • 什么地方出了错:
    任务':transformClassesWithDexForDebug'的执行失败 .

com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件限定
Landroid /支持/ V4 / accessibilityservice / AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl;

*尝试:
使用--stacktrace选项运行以获取堆栈跟踪 . 使用--info或--debug选项运行以获取更多日志输出 .

建筑失败

总时间:1分钟16.804秒
错误:/ Users / adithya / Desktop / mobile-app / eImpact / platforms / android / gradlew:
命令失败,退出代码为1错误输出:注意:某些输入文件使用或覆盖已弃用的API . 注意:使用-Xlint重新编译:弃用以获取详细信息 . 注意:某些输入文件使用或覆盖已弃用的API . 注意:使用-Xlint重新编译:弃用以获取详细信息 . 注意:某些输入文件使用或覆盖已弃用的API . 注意:使用-Xlint重新编译:弃用以获取详细信息 . FAILURE:构建因异常而失败 .

  • 什么地方出了错:
    任务':transformClassesWithDexForDebug'的执行失败 .

com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:com.android.dex.DexException:多个dex文件定义
Landroid /支持/ V4 / accessibilityservice / AccessibilityServiceInfoCompat $ AccessibilityServiceInfoVersionImpl;

*尝试:
使用--stacktrace选项运行以获取堆栈跟踪 . 使用--info或--debug选项运行以获取更多日志输出 .

我的依赖如下

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    debugCompile(project(path: "CordovaLib", configuration: "debug"))
    releaseCompile(project(path: "CordovaLib", configuration: "release"))
    compile "com.android.support:support-v4:+"
    // SUB-PROJECT DEPENDENCIES END
}

有没有人有同样的问题,提前谢谢