这就是我的所作所为。
在命令行中:
$ phonegap -v
5.3.6
$ phonegap create myfirstproject
Creating a new cordova project.
Downloading hello-world-template libarary for www...
Download Complete
$ cd myfirstproject
$ phonegap remote login
[phonegap] Phonegap/Build Login
[phonegap] Sign up at build.app.com
[warning] Github accounts are unsupported
[prompt] enter username: myusername
[prompt] enter password: **********
[phonegap] logged in as myusername
$ phonegap remote run android
[phonegap] compressing the app
[phonegap] uploading the app
[phonegap] building the app
[error] error occured while building the android app
然后我转到https://build.phonegap.com并登录。我转到我的应用程序,然后单击“android”并将我重定向到我的项目构建。我点击“日志”按钮,我得到了这个:
-compile:
[javac] Compiling 43 source files to /project/bin/classes
[javac] /project/src/org/apache/cordova/filetransfer/FileTransfer.java:692: error: cannot find symbol
[javac] if (!isLocalTransfer && !Config.isUrlWhiteListed(source)) {
[javac] ^
[javac] symbol: method isUrlWhiteListed(String)
[javac] location: class Config
[javac] /project/src/org/apache/cordova/inappbrowser/InAppBrowser.java:122: error: cannot find symbol
[javac] || Config.isUrlWhiteListed(url)) {
[javac] ^
[javac] symbol: method isUrlWhiteListed(String)
[javac] location: class Config
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 2 errors
BUILD FAILED
/android-sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/android-sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.
Total time: 6 seconds
/project/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/project/build.xml
有人知道这个错误吗?我们怎样解决这个问题?
答案 0 :(得分:1)
我刚刚找到了答案!
我之所以遇到这些错误,是因为phonegap / cordova将其插件源移动到 NPM 。
这是我为解决问题所做的工作。
我更新了所有" 插件名称及其来源"在 config.xml 中,如:
来自:
<gap:plugin name="cordova-plugin-camera" source="npm" />
到此:
MessageSecurityWebApplicationInitizializer
现在,我成功构建了应用程序。 =)
<强>参考强>: