Firefox의 Android 모바일 버전 용 Firefox 확장 프로그램을 개발하려고합니다.NS_ERROR_FAILURE : Mozilla SDK (firefox mobile)
이var target = Cc["@mozilla.org/file/directory_service;1"]
.getService(Ci.nsIProperties)
.get("DfltDwnld", Ci.nsIFile);
이 Windows에서 현재 파이어 폭스, 안드로이드에 나이틀리에 있지만 안드로이드의 현재 파이어 폭스 버전에서 완벽하게 작동합니다 : 내 코드는 다음 코드가 포함되어 있습니다.
코드 :
Cu.import("resource://gre/modules/FileUtils.jsm");
var target = FileUtils.getFile("DfltDwnld", entryName);
결과 :
내가하려고 할 때 다른 파일을 만들기 위해, 나는 비슷한 결과를 얻을 수 있었다, 마찬가지로I/stdout (17182): ************************************************************
I/stdout (17182): * Call to xpconnect wrapped JSObject produced this error: *
I/stdout (17182): [Exception... "Component returned failure code: 0x80004005 (N
S_ERROR_FAILURE) [nsIProperties.get]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: resource://gre/modules/XPIProvider.jsm -> jar:file:///m
nt/sdcard/jetpack-profile/extensions/[email protected]!/bootstrap.
js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://jid1-deaye
7ppkgpblg-at-jetpack/my-addon/lib/main.js :: extractFile :: line 109" data: no]
I/stdout (17182): ************************************************************
: 후자는 다음과 같은 오류를 제공합니다
E/GeckoConsole(2157): [JavaScript Error: "[Exception... "Component returned fai
lure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]" nsresult: "0x8000
4005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/FileUtil
s.jsm :: FileUtils_getDir :: line 63" data: no]" {file: "resource://gre/modules
/FileUtils.jsm" line: 63}]
어떤 일이 벌어지고 있으며 무엇을 할 수 있습니까? 마치 스크립트가 다운로드 디렉토리에 쓸 수있는 권한이없는 것입니다.
와 기본 디렉토리를 얻을 수 있으며, 페넥의 최신 버전에 표시되지 않습니다. – paa