我尝试使用ant scripting使用3.0.0.GA进行钛构建时出现以下错误
[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
答案 0 :(得分:0)
很久以前,问过这个问题。但我想我的发现可能很有趣,因为我最后发生了AssetCryptImpl.java:44: error: cannot find symbol
错误。 AssetCryptImpl.java模板在构建期间填充了一些资产变量(check ~/.titanium/mobilesdk/linux/6.1.0.GA/android/cli/commands/_build.js
)。这个过程至少取决于Linux对某些系统命令的影响。在我的构建过程中,这些命令因Seging Fault而失败。因此,资产变量不会在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"
并尝试运行包含的命令。