起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1847|回复: 5

[处理中3] android插件使用到android V4包提供的接口打包抛出异常

[复制链接]

2

主题

15

帖子

25

积分

新手上路

Rank: 1

积分
25
QQ
发表于 2017-3-15 10:22:17 | 显示全部楼层 |阅读模式
android插件用到android包v4接口在配置文件中配置引用后用WeX5打包抛出异常
1.插件代码as单独运行是正常的
2.插件代码调整,隐藏v4接口代码,另把配置文件中引用包也去掉,方可正常打包

下面是使用到V4包中接口抛出的异常信息

生成android应用包:
      Running command: cmd "/s /c "E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\cordova\build.bat --release --gradleArg=--offline""
      ANDROID_HOME=E:\Tools\WeX5\WeX5_V3.6\tools\adt-sdk
      JAVA_HOME=E:\Tools\WeX5\WeX5_V3.6\java\jre1.8
      Running: E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\gradlew cdvBuildRelease -b E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline
      embedded
      org.xwalk:xwalk_core_library:15+
      Incremental java compilation is an incubating feature.
      :preBuild UP-TO-DATE
      :preArmv7ReleaseBuild UP-TO-DATE
      :checkArmv7ReleaseManifest
      :preX86ReleaseBuild UP-TO-DATE
      :CordovaLib:preBuild UP-TO-DATE
      :CordovaLib:preReleaseBuild UP-TO-DATE
      :CordovaLib:compileReleaseNdk UP-TO-DATE
      :CordovaLib:compileLint
      :CordovaLib:copyReleaseLint UP-TO-DATE
      :CordovaLib:checkReleaseManifest
      :CordovaLib:preDebugAndroidTestBuild UP-TO-DATE
      :CordovaLib:preDebugBuild UP-TO-DATE
      :CordovaLib:preDebugUnitTestBuild UP-TO-DATE
      :CordovaLib:preReleaseUnitTestBuild UP-TO-DATE
      :JustepGetContent:preBuild UP-TO-DATE
      :JustepGetContent:preReleaseBuild UP-TO-DATE
      :JustepGetContent:compileReleaseNdk UP-TO-DATE
      :JustepGetContent:compileLint
      :JustepGetContent:copyReleaseLint UP-TO-DATE
      :JustepGetContent:checkReleaseManifest
      :JustepGetContent:preDebugAndroidTestBuild UP-TO-DATE
      :JustepGetContent:preDebugBuild UP-TO-DATE
      :JustepGetContent:preDebugUnitTestBuild UP-TO-DATE
      :JustepGetContent:preReleaseUnitTestBuild UP-TO-DATE
      :JustepGetContent:prepareComAndroidSupportSupportV42330Library
      :JustepGetContent:prepareReleaseDependencies
      :JustepGetContent:compileReleaseAidl
      :JustepGetContent:compileReleaseRenderscript
      :JustepGetContent:generateReleaseBuildConfig
      :JustepGetContent:generateReleaseAssets UP-TO-DATE
      :JustepGetContent:mergeReleaseAssets
      :JustepGetContent:generateReleaseResValues
      :JustepGetContent:generateReleaseResources
      :JustepGetContent:mergeReleaseResources
      :JustepGetContent:processReleaseManifest
      :JustepGetContent:processReleaseResources FAILED
      
      BUILD FAILEDE:\Tools\WeX5\WeX5_V3.6\model\Native\忠县日常工作辅助信息系统\build\src\platforms\android\JustepGetContent\build\intermediates\res\merged\release\values\values.xml:12: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
      
      
         
      Total time: 4.436 secs
      E:\Tools\WeX5\WeX5_V3.6\model\Native\忠县日常工作辅助信息系统\build\src\platforms\android\JustepGetContent\build\intermediates\res\merged\release\values\values.xml:20: AAPT: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light'.
         
      E:\Tools\WeX5\WeX5_V3.6\model\Native\忠县日常工作辅助信息系统\build\src\platforms\android\JustepGetContent\src\main\res\values\styles.xml:16:5-22:13: AAPT: No resource found that matches the given name: attr 'colorPrimary'.
         
      E:\Tools\WeX5\WeX5_V3.6\model\Native\忠县日常工作辅助信息系统\build\src\platforms\android\JustepGetContent\src\main\res\values\styles.xml:16:5-22:13: AAPT: No resource found that matches the given name: attr 'windowActionBar'.
         
      E:\Tools\WeX5\WeX5_V3.6\model\Native\忠县日常工作辅助信息系统\build\src\platforms\android\JustepGetContent\src\main\res\values\styles.xml:16:5-22:13: AAPT: No resource found that matches the given name: attr 'windowNoTitle'.
         
      
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      Execution failed for task ':JustepGetContent:processReleaseResources'.
      > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Tools\WeX5\WeX5_V3.6\tools\adt-sdk\build-tools\23.0.3\aapt.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 building one of the platforms: Error: cmd: Command failed with exit code 1
      You may not have the required environment or OS to build this project
      
      E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\cordova\node_modules\q\q.js:126
                          throw e;
                          ^
      Error code 1 for command: cmd with args: /s /c "E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\gradlew cdvBuildRelease -b E:\Tools\WeX5\WeX5_V3.6\model\Native\蹇犲幙鏃ュ父宸ヤ綔杈呭姪淇℃伅绯荤粺\build\src\platforms\android\build.gradle -Dorg.gradle.daemon=true --offline"
      Error: cmd: Command failed with exit code 1
   ****ERROR****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildAndroid" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
   C:\Users\ADMINI~1\AppData\Local\Temp\6c9c8392-f944-4e98-a017-9d1a9216e5aa\pack.xml:88: exec returned: 1
           at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:643)
           at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669)
           at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495)
           at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
           at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:497)
           at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
           at org.apache.tools.ant.Task.perform(Task.java:348)
           at org.apache.tools.ant.Target.execute(Target.java:435)
           at org.apache.tools.ant.Target.performTasks(Target.java:456)
           at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
           at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
           at com.justep.deploy.app.utils.BuildHelper.execTask(Unknown Source)
           at com.justep.deploy.app.utils.Builder.main(Unknown Source)
****ERROR****: 子任务 "java" 执行失败。
****ERROR****: 任务 "pack" 执行失败。
****ERROR****: 执行出错:
****ERROR****: 错误信息: Java returned: -3
****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
发表于 2017-3-15 11:19:02 | 显示全部楼层
是自己集成插件吗??
需要注意的点看一下:http://docs.wex5.com/wex5-app-question-list-2051

如果还不行!!那就是这个插件不符合cordova规范!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

2

主题

15

帖子

25

积分

新手上路

Rank: 1

积分
25
QQ
 楼主| 发表于 2017-3-15 14:15:27 | 显示全部楼层
liangyongfei 发表于 2017-3-15 11:19
是自己集成插件吗??
需要注意的点看一下:http://docs.wex5.com/wex5-app-question-list-2051

是自己集成的,用cordova 命令编译是可以正常使用的,使用WeX5打包就出现异常
插件中plugin.xml我也配置了
<source-file src="src/android/libs/android-support-v4.jar" target-dir="libs" />

Native/templates/advanced/platforms/android/JustepGetContent/build.gradle
build.gradle 中默认配置是v7,我也添加配置了v4
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:support-v4:23.3.0'
}
回复 支持 反对

使用道具 举报

发表于 2017-3-15 14:41:18 | 显示全部楼层
selinahxl 发表于 2017-3-15 14:15
是自己集成的,用cordova 命令编译是可以正常使用的,使用WeX5打包就出现异常
插件中plugin.xml我也配置 ...

你的插件中jar包 编译版本是多少??请使用较低的版本!
这个问题看不出,编译出错了!
不知是版本或者cordova规范不匹配...

建议Wex5 解压在D盘根目录下,重新打包试试吧!
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

2

主题

15

帖子

25

积分

新手上路

Rank: 1

积分
25
QQ
 楼主| 发表于 2017-3-15 15:26:51 | 显示全部楼层
liangyongfei 发表于 2017-3-15 14:41
你的插件中jar包 编译版本是多少??请使用较低的版本!
这个问题看不出,编译出错了!
不知是版本或者co ...

部分提交变成中文,我也郁闷,我提交前和提交后,的信息都变样了。插件是没有问题的,在DOS命令中用cordova命令编译直连手机运行都可以的,用WeX5集成打包就出现异常。猜测还是Wex5某个地方需要调整配置吧
回复 支持 反对

使用道具 举报

发表于 2017-3-15 15:32:05 | 显示全部楼层
selinahxl 发表于 2017-3-15 15:26
部分提交变成中文,我也郁闷,我提交前和提交后,的信息都变样了。插件是没有问题的,在DOS命令中用cordo ...

这种问题一般是插件规范不符合要求!,,,或者他要求的版本比我们的高!!!

什么中文??

解压大D盘根目录试过了吗?
qq:1912779713
WeX5教程--WeX5下载
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-5-3 19:56 , Processed in 0.082462 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表