Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Ionic构建Android解析错误失败_Java_Android_Cordova_Build_Ionic Framework - Fatal编程技术网

Java Ionic构建Android解析错误失败

Java Ionic构建Android解析错误失败,java,android,cordova,build,ionic-framework,Java,Android,Cordova,Build,Ionic Framework,我对Ionic构建Android有一个问题:当我尝试时 要使用Android平台构建我的应用程序,我遇到了一个错误 ***Config:*** NodeJS 4.4.5 Ionic 1.7.15 JDK 1.8.0_65 target=android-23 运行命令时: >ionic build android 我有一个错误: D:\ionic\MyInstitutBat>ionic build android Running command: D:\Tools\node

我对Ionic构建Android有一个问题:当我尝试时 要使用Android平台构建我的应用程序,我遇到了一个错误

***Config:***
NodeJS 4.4.5
Ionic 1.7.15
JDK 1.8.0_65   
target=android-23
运行命令时:

>ionic build android 
我有一个错误:

D:\ionic\MyInstitutBat>ionic build android
Running command: D:\Tools\nodejs\node.exe D:\ionic\MyInstitutBat\hooks\after_prepare\010_add_platform_class.js D:\ionic\MyInstitutBat
add to body class: platform-android
ANDROID_HOME=D:\Tools\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources
:generateDebugSources
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk UP-TO-DATE
:compileDebugSources UP-TO-DATE
:transformClassesWithDexForDebug
PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/BuildConfig.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/MainActivity.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/R.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/R$attr.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/R$drawable.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/R$string.class

PARSE ERROR:
unsupported class file version 52.0
...while parsing com/ionicframework/starter/R$xml.class
7 errors; aborting

 FAILED


BUILD FAILED

Total time: 2 mins 23.749 secs
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_65\bin\java.exe'' finished with non-zero exit
value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"D:\ionic\MyInstitutBat\platforms\android\gradlew cdvBuildDebug -b D:\ionic\MyInstitutBat\platforms\android\build.gradle -Dorg.gradle.d
aemon=true -Pandroid.useDeprecatedNdk=true"
我怎样才能解决这个问题?谢谢你的帮助


注意:尝试使用K
1.7.0_80
,它不起作用

没有您提到的显示代码错误的特定错误日志

添加平台时,可能会出现一些ionic/cordova配置不匹配

请使用以下代码之一删除并添加平台,然后重试工作

1) cordova平台rm androidcordova平台添加android

2) 爱奥尼亚平台rm android爱奥尼亚平台添加android


没有您提到的显示代码错误的特定错误日志

添加平台时,可能会出现一些ionic/cordova配置不匹配

请使用以下代码之一删除并添加平台,然后重试工作

1) cordova平台rm androidcordova平台添加android

2) 爱奥尼亚平台rm android爱奥尼亚平台添加android


您是否尝试过删除平台并再次添加,然后进行生成?我删除了平台并再次添加,然后再次生成。==>建立成功。问题解决了。那么结果如何?建立成功。谢谢你的主意。哇哦。。很高兴帮助你。:)我能回答这个问题吗?你同意我的回答吗您是否尝试过删除平台并再次添加,然后进行生成?我删除了平台并再次添加,然后再次生成。==>建立成功。问题解决了。那么结果如何?建立成功。谢谢你的主意。哇哦。。很高兴帮助你。:)我能回答这个问题吗?你同意我的回答吗应用方法2)后构建成功,即>离子平台移除android,然后>离子平台android。非常感谢。很好:),我的问题解决了。然后标记为已回答,以便其他人面对相同的问题,他们也可以用给定的解决方案解决。很高兴为您提供帮助。应用方法2)后成功构建,即>离子平台删除android,然后>离子平台android。非常感谢。很好:),我的问题解决了。然后标记为已回答,以便其他人面对相同的问题,他们也可以用给定的解决方案解决。很高兴帮助你。