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

QQ登录

只需一步,快速开始

查看: 3536|回复: 12

[处理中3] 3.8版本插件问题?

[复制链接]

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
发表于 2018-8-30 10:08:56 | 显示全部楼层 |阅读模式
3.6的wex5 铛铛发送语音没问题,用3.8版本就有问题,换了media-capture插件也不管用
如果整个项目都用3.6来打包怕某些功能有问题

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-30 10:09:41 | 显示全部楼层
飞哥求助
回复

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35910
发表于 2018-8-30 14:06:22 | 显示全部楼层
换插件之前用的什么插件?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-30 14:40:50 | 显示全部楼层
jishuang 发表于 2018-8-30 14:06
换插件之前用的什么插件?

3.8版本的media-capture,换成3.6版本的media-capture
回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-30 14:51:43 | 显示全部楼层
3.8版本的wex5和3.6版本的wex5除了插件不一样,其他的应该都一样吧
代码是没变的,3.6的就可以发语音,3.8的就不行
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
35910
发表于 2018-8-30 17:37:08 | 显示全部楼层
更新cordova-plugin-media插件为最新版本了
navigator.device.capture.captureAudio调用不会录音?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-31 17:02:07 | 显示全部楼层
本帖最后由 yj01263431 于 2018-8-31 17:03 编辑
jishuang 发表于 2018-8-30 17:37
更新cordova-plugin-media插件为最新版本了
navigator.device.capture.captureAudio调用不会录音? ...

3.8版本的插件录音完成并没有触发 onFinishRecVoice 事件
Model.prototype.superInputFinishRecVoice = function(event) {
                alert("发送语音");
                // TODO 发送语音
                var peer = this.curPeer;
                if (peer)
                        IM.sendVoiceMessage(peer, 0, event.voice);
        };

回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-31 17:30:32 | 显示全部楼层
yj01263431 发表于 2018-8-31 17:02
3.8版本的插件录音完成并没有触发 onFinishRecVoice 事件
Model.prototype.superInputFinishRecVoice = fu ...

self.getFileData(self.fileName).then(function(voice) {
                                                        self._recording = false;
                                                        var eData = {
                                                                source : self,
                                                                recorder : self.mediaRec,
                                                                voice : voice
                                                        };
                                                        self.fireEvent('onFinishRecVoice', eData);
                                                });
执行这个函数没正常返回
回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-31 17:32:42 | 显示全部楼层
getFileData : function(url) {
                        var deferred = $.Deferred();
                        var gotFileEntry = function(fileEntry) {
                                console.log("z");
                                fileEntry.file(gotFile, fail);
                        };
                        console.log("x");
                        var gotFS = function(fileSystem) {
                                fileSystem.root.getFile(url, {
                                        create : true,
                                        exclusive : false
                                }, gotFileEntry, fail);
                        };
                        var gotFile = function(file) {
                                /* deferred.resolve(file); */
                                var reader = new FileReader();
                                reader.onload = function(e) {
                                        deferred.resolve(new Blob([ this.result ], {
                                                type : 'audio/wav'
                                        }));
                                };
                                reader.readAsArrayBuffer(file);

                        };
                        var fail = function() {
                                console.log("fail");
                        };
                       
                        window.resolveLocalFileSystemURI(url, gotFileEntry, fail);
                        return deferred.promise();
                },
跳到fail 函数了,应该是cordova-plugin-file 这个插件的问题
回复 支持 反对

使用道具 举报

105

主题

390

帖子

698

积分

高级会员

Rank: 4

积分
698
QQ
 楼主| 发表于 2018-8-31 18:01:27 | 显示全部楼层
生成android应用包:
      
      You have been opted out of telemetry. To change this, run: cordova telemetry on.
      args.nofetch undefined
      android project rename compelete!!!!!!
      ANDROID_HOME=C:\BaiduYunDownload\WeX5_3.8\tools\adt-sdk
      JAVA_HOME=C:\BaiduYunDownload\WeX5_3.8\java\jre1.8
      Parallel execution with configuration on demand is an incubating feature.
      :wrapper
      
      BUILD SUCCESSFUL
      
      Total time: 5.404 secs
      Subproject Path: CordovaLib
      Subproject Path: JustepGetContent
      NDK is missing a "platforms" directory.
      If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\BaiduYunDownload\WeX5_3.8\tools\adt-sdk\ndk-bundle.
      If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
      
      The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
              at build_4bl0va1xu1dpflknjxa3mrb6j.run(C:\BaiduYunDownload\WeX5_3.8\model\Native\dd\build\src\platforms\android\build.gradle:150)
      
      FAILURE: Build failed with an exception.Checking the license for package Android SDK Platform 22 in C:\BaiduYunDownload\WeX5_3.8\tools\adt-sdk\licenses
      
      * What went wrong:
      A problem occurred configuring root project 'android'.
      
      > You have not accepted the license agreements of the following SDK components:
      [Android SDK Platform 22].
      Warning: License for package Android SDK Platform 22 not accepted.
      
      BUILD FAILED
      
      Total time: 13.168 secs
      Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
      Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      Error: cmd: Command failed with exit code 1 Error output:
      FAILURE: Build failed with an exception.
      
      * What went wrong:
      A problem occurred configuring root project 'android'.
      > You have not accepted the license agreements of the following SDK components:
      [Android SDK Platform 22].
      Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
      Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
      
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      Picked up _JAVA_OPTIONS: -Xmx1024M
   ****ERROR****: 子任务 "exec" 执行失败。
   ****ERROR****: 任务 "buildAndroid" 执行失败。
   ****ERROR****: 执行出错:
   ****ERROR****: 错误信息: exec returned: 1
   ****ERROR****: 如不能确定具体问题,可参考常见问题: http://bbs.wex5.com/thread-82002-1-1.html
   C:\Users\admin\AppData\Local\Temp\afb9a7d1-4d8e-40e8-b4ed-9a1675504827\pack.xml:91: 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

用3.6版本的file插件打包报错
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-19 09:54 , Processed in 0.069182 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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