1

尝试使用 ant 脚本使用 3.0.0.GA 构建 Titan 时出现以下错误

[exec] [ERROR] Error(s) compiling generated Java code
[exec] [ERROR] D:\Workarea\experiment\teacher\digitallyTE\build\android\gen

\com\edurite\digiteacher\DigitallyteApplication.java:36: cannot find symbol [exec] symbol : class AssetCryptImpl [exec] location: class com.edurite.digiteacher.DigitallyteApplication [exec] KrollAssetHelper.setAssetCrypt(new AssetCryptImpl()) ; [exec] ^ [exec] Note: D:\Workarea\experiment\teacher\digitallyTE\build\android\gen\c om\edurite\digitallyTE\AssetCryptImpl.java uses unchecked or unsafe operations. [exec] Note: Recompile with -Xlint:unchecked for details. [exec] 1 error [exec]

BUILD FAILED D:\Workarea\experiment\teacher\build.xml:11: exec returned: 1
4

1 回答 1

0

很久以前有人问过这个问题。但我想我的发现可能很有趣,因为AssetCryptImpl.java:44: error: cannot find symbol我最后发生了一个错误。AssetCryptImpl.java 模板在构建期间填充了一些资产变量(检查~/.titanium/mobilesdk/linux/6.1.0.GA/android/cli/commands/_build.js)。这个过程至少依赖于 Linux 上的一些系统命令。在我的构建过程中,这些命令因分段错误而失败。因此资产变量不会在 AssetCryptImpl.java 模板中呈现,Java 编译器会抱怨缺少符号。

检查您的构建输出是否有类似的行

[INFO] : Encrypting JavaScript files: /home/simon/.titanium/mobilesdk/linux/6.1.0.GA/android/titanium_prep.linux64 "com.example.id" "/home/simon/test/Asdf/build/android/assets" "alloy/CFG.js" "app.js" "alloy/backbone.js" "alloy/constants.js" "alloy/controllers/BaseController.js" "alloy/controllers/index.js" "alloy/styles/index.js" "alloy/sync/localStorage.js" "alloy/sync/properties.js" "alloy/sync/sql.js" "alloy/underscore.js" "alloy/widget.js" "alloy.js" "ti.cloud/ti.cloud.js" "_app_props_.json"

并尝试运行包含的命令。

于 2017-06-23T07:52:49.857 回答