Loading [MathJax]/jax/input/TeX/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >Cordova Media Capture Android错误3号问题

Cordova Media Capture Android错误3号问题
EN

Stack Overflow用户
提问于 2014-02-23 12:52:11
回答 3查看 2.3K关注 0票数 3

我目前正在开发一个关于非常短的录音的移动应用程序,为了时间起见,我决定用Cordova (而不是Phonegap)来构建它。不幸的是,今天我一直在与我的Nexus5上的实际录音作斗争。

我使用的是Cordova媒体捕获插件,当前运行的代码与他们的文档中的代码完全相同。

在旧设备上,一切都运行得很好。然而,在我的Nexus5上,当我点击按钮录制音频时,即使没有打开录音机,它也只返回错误代码3(没有录制媒体文件)。我认为这可能是新的Android的问题,但在模拟器上它运行得很好。我还想,不知何故,这可能与我在设备上找不到任何音频录制应用程序有关,所以我安装了一个应用程序,但仍然什么都没有。

然后我想也许我做错了什么,所以我安装了这个应用程序:https://github.com/Icenium/sample-capture和同样的问题。

这里有一些关于更新捕获Java文件的建议,我这样做了,但仍然没有帮助。下一步我可以尝试什么?

EN

回答 3

Stack Overflow用户

发布于 2015-01-05 18:22:11

这是因为默认情况下没有安装应用程序来处理意图(正如上面其他人所解释的那样)。

尝试安装一个处理该意图的应用程序。例如,我使用了这个:

https://play.google.com/store/apps/details?id=com.brightattic.soundrecorder&hl=en

(请注意,除了证明问题是缺少录音器应用程序之外,我不会为这款应用程序提供任何支持)。

票数 2
EN

Stack Overflow用户

发布于 2014-02-23 14:02:34

也许可以尝试在androidmanifest.xml中将targetsdk设置为18而不是19 (当然,还要确保在android sdk管理器中安装了API18)。

这将迫使新的kitkat chrome webview以怪癖模式运行,其行为方式类似于jellybean中的webview。

票数 1
EN

Stack Overflow用户

发布于 2014-03-19 18:15:17

我也有同样的问题,运行adb logcat很有用:

代码语言:javascript
运行
AI代码解释
复制
W/System.err(22102): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.provider.MediaStore.RECORD_SOUND }
...
D/CordovaLog(22102): file:///android_asset/www/js/index.js: Line 77 : Capture ERROR: {"message":"Canceled.","code":3}

对我来说,问题是Nexus 5 (android 4.4.2)没有处理意图,即似乎没有默认的录音机。在具有默认录音机的设备上,如果该应用程序不包含RECORD_SOUND接收器,您可能会看到此错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21968455

复制
相关文章
cordova插件- Media Capture
添加插件 $ cordova plugin addcordova-plugin-media-capture 插件的使用 Methods capture.captureAudio capture.ca
roc
2018/03/30
1K0
cordova插件- Media Capture
Cordova插件cordova-plugin-media-capture实现短视频的录制上传和播放
1、网上的教程大部分都是虎头蛇尾的不全的。互相抄来抄去真的感觉就没有一个是真正自己去写一写的,不然这里面这么多的坑就没有一个人出来说说的?下面就写写我实现功能过程中的一些问题吧,代码绝对完整并且按照步骤来一定可以成功!
用户6493868
2022/03/05
1.9K0
cordova插件- Media
添加插件 $ cordova plugin add cordova-plugin-media 插件的使用 Methods · media.getCurrentAmplitude:Returns th
roc
2018/03/30
1.3K0
cordova插件- Media
Cordova 拍视频和本地压缩
navigator.device.capture.captureVideo 输出的log
acc8226
2022/05/17
6410
cordova-cli@8.0和cordova-android@7.0.0问题说明
默认安装cordova-android@~7.0.0,实际上大于等于7.0的当前可选版本就只有cordova-android@7.0.0,所以安装了它。
IT晴天
2018/08/20
9910
cordova-cli@8.0和cordova-android@7.0.0问题说明
cordova android
Image.png Image.png http://www.jscss.cc/2016/10/18/cordova.html 装一个全局的cordova: 官网介绍: http://cordova.apache.org/ Image.png 运行的时候自动弹出浏览器: Image.png Image.png Svon(555486L7I7L5对话) 11:20:29 webpack Svon(555486L7I7L5对话) 11:24:30 npm uninstall -g cordova
王小婷
2018/06/04
6980
cordova-plugin-media实现移动端录音功能
安装插件 cordova plugin add cordova-plugin-media-capture 移动端方法调取手机录音 audioCapture(){ navigator.device.audiorecorder.recordAudio(this.successCallback, this.errorCallback, 60); }, 成功回调方法: successCallback(data){ this.filename = JSON.parse(data).file_name;
安德玛
2022/03/06
9660
Cordova 打包错误 ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVari
问题描述 今天在使用 “cordova build android” 的时候,发现报下面的错误 ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex FAILED FAILURE:
kongxx
2018/05/14
1.9K0
cordova declare styleable 错误「建议收藏」
出现 ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute
全栈程序员站长
2022/09/14
3840
cordova-android版本
这样会添加默认版本号的,如android@6.2.3,如果安装某些cordova插件时对cordova-android版本有要求,如:
IT晴天
2018/08/20
3890
cordova-android版本
Scan Media Files in Android
I once tried to use MediaScanner to resolve problems; however it turned out to be a failure. Now I make it.This post is to write down why I failed and how I work it out now. I think it could be deeper that other posts.
技术小黑屋
2018/09/04
1.6K0
Code Snippet for Media on Android
A few days ago,I have wrote down this post http://androidyue.github.io/blog/2014/01/19/scan-media-files-in-android/. Now I will paste my code snippet.
技术小黑屋
2018/09/04
7530
cordova 8.0.0创建android项目libs的jar找不到问题
在项目app目录下面找到build.gradle文件找到 image.png 找到 implementation fileTree(dir: 'libs', include: '*.jar')
24-丰总
2018/07/04
7220
http请求415错误Unsupported Media Type
之前用了封装的ajax,因为请求出了点问题,我试了下jQuery的$.ajax,报出了415的错误,从没遇到过这个错误,所以也是花了不少时间在研究这个问题的出处
全栈程序员站长
2022/09/07
2.5K1
http请求415错误Unsupported Media Type
ionic cordova resources问题说明
ionic cordova resources是用于一键打包生成各分辨率icon和splash的命令,在使用过程中可能会遇到以下问题:
IT晴天
2018/08/20
1.3K0
网络请求发生错误: Unsupported Media Type
最近一个项目中要用到环信,在注册时要用授权注册,直接在app中通过接口获取token注册,在请求token时发生了一个错误,错误信息:Unsupported Media Type
全栈程序员站长
2022/08/28
7110
Cordova一些问题
1. 2018年4月运行以前的cordova项目出错,新建项目也不行 node v6.10.4下,将cordova卸载,然后重装6.3.1 $ cnpm uninstall -g cordova $ cpnm i -g cordova@6.3.1 $ cordova create xxx 2. 构建项目出错 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':CordovaLib:p
用户2187945
2018/06/27
1.2K0
cordova run android 下载gradle报timeout
1)下载zip包 https://services.gradle.org/distributions/gradle-4.1-all.zip
治电小白菜
2020/08/25
9440
cordova run android 下载gradle报timeout
Spring 发送 JSON 数据提示 Unsupported Media Type 错误 “status“: 415, “error“: “Unsupported Media Type
在 POST 数据的时候,我们可能会使用 JSON 为数据源,但是在发送后,我们得到下面的错误信息:
Maynor
2021/12/06
9690
Spring 发送 JSON 数据提示 Unsupported Media Type 错误 “status“: 415, “error“: “Unsupported Media Type
cordova编译android app之苦逼心路
遇到的问题: FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. > Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager. * Try:
周星星9527
2021/11/15
1.3K0
cordova编译android app之苦逼心路

相似问题

Cordova Media-Capture插件不工作

112

Cordova Media Capture captureImage在IOS中崩溃

11

无法安装'cordova-plugin-media-capture':CordovaError

15

使用cordova-plugin-media-capture压缩视频

10

cordova-plugin-media-capture崩溃IOS 13

129
添加站长 进交流群

领取专属 10元无门槛券

AI混元助手 在线答疑

扫码加入开发者社群
关注 腾讯云开发者公众号

洞察 腾讯核心技术

剖析业界实践案例

扫码关注腾讯云开发者公众号
领券
社区富文本编辑器全新改版!诚邀体验~
全新交互,全新视觉,新增快捷键、悬浮工具栏、高亮块等功能并同时优化现有功能,全面提升创作效率和体验
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
查看详情【社区公告】 技术创作特训营有奖征文