0
나는 the Documentations을 따른다. 이미 모든 플러그인을 추가했습니다.phonegap cordova camera fail
cordova plugin add git-wip-us.apache.org/repos/asf/cordova-plugin-media.git
cordova plugin add git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture.git
cordova plugin add git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
config와 관련된 모든 권한을 명시해야합니다.
설정 :
<access origin="*" />
<plugin name="Camera" value="org.apache.cordova.CameraLauncher" />
<feature name="http://api.phonegap.com/1.0/camera"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/geolocation"/>
<feature name="http://api.phonegap.com/1.0/network"/>
<feature name="http://api.phonegap.com/1.0/file"/>
<feature name="http://api.phonegap.com/1.0/media"/>
<feature name="http://api.phonegap.com/1.0/device"/>
<feature name="http://api.phonegap.com/1.0/notification"/>
<feature name="http://api.phonegap.com/1.0/battery"/>
매니페스트 : 나는 심지어 문서와 아무것도에서 HTML 페이지를 복사
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<feature name="http://api.phonegap.com/1.0/camera" />
<uses-permission android:name="android.permission.RECORD_VIDEO" />
! 내 카메라가 작동하지 않아! 내 프로젝트는 그런 식으로 구축
:
이cordova create hello com.example.hello "HelloWorld"
cd hello
cordova platform add android
cordova build
사람이 어떤 문제를 알고하세요?
편집
오류 로그 : 해결
14:10:55 Frameworks detected: Android framework is detected in the project Configure
14:12:30 IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
14:12:30 Frameworks detected: Android framework is detected in the project Configure
14:12:33 Frameworks detected: Android framework is detected in the project Configure
나는 코르도바의 이전 버전을 가지고 있었다.
로 교체하여 Config.xml의 모든 라인을 제거합니다. –
아주 오래된 버전의 phonegap 문서를 읽는 중입니다. 최신 문서 (https://github.com/apache/cordova-plugin-camera/blob/dev/doc/index.md)를 읽어야합니다. – QuickFix
내 안드로이드 스튜디오 이벤트 로그는 다음과 같습니다. 14:10:55 프레임 워크 감지 됨 : 프로젝트에서 안드로이드 프레임 워크가 감지되었습니다. 구성 14:12:30 IndexNotReadyException : com.intellij.openapi.project.IndexNotReadyException 문서에 따라 호출자를 변경하십시오. com.intellij.openapi.project.IndexNotReadyException 문서 에 따라 발신자를 변경하십시오. 14:12:30 프레임 워크가 감지되었습니다. 프로젝트에서 Android 프레임 워크가 감지되었습니다. 구성 14:12:33 프레임 워크가 감지되었습니다. 프로젝트에서 Android 프레임 워크가 감지되었습니다. – avishayhajbi