我正在使用Titanium& amp; Alloy和我终于能够运行iOS版本,但是当我运行appc ti build -p android
命令时,我在Android上遇到了错误。
在Building Java source files
步骤
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/javac
"-J-Xmx1024M" "-encoding" "utf8" "-bootclasspath" "/Users/fharper/Library/Android/sdk/platforms/android-
23/android.jar:/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/kroll-v8.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-analytics.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/aps-analytics.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-android.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/jaxen-1.1.1.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/ti-commons-codec-1.3.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/kroll-common.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/titanium.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-multidex.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-filesystem.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-app.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-ui.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/nineoldandroids-appc-2.4.0.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-media.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-appcompat.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-v4.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-v7-appcompat.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-cardview.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/cardview-v7-23.0.1.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-locale.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-network.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-xml.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-platform.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-gesture.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-database.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-geolocation.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/ti.compression/3.0.0/compression.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/analytics.google/3.2.0/analytics.google.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/analytics.google/3.2.0/lib/google-play-services-analytics.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/analytics.google/3.2.0/lib/google-play-services-base.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/analytics.google/3.2.0/lib/google-play-services-basement.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/analytics.google/3.2.0/lib/play-services-analytics-impl.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/com.ideeclic.insitu.insituwebserver/2.0.0/insituwebserver.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/ti.map/3.0.1/map.jar:/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/ti.map/3.0.1/lib/google-play-services-map.jar:
/Users/fharper/Library/Application Support/Titanium/modules/android/com.alcoapps.actionbarextras/1.7.3/actionbarextras.jar:
/Users/fharper/Documents/Code/TheProject/TheProject/modules/android/com.tripvi.drawerlayout/2.0.0/drawerlayout.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/kroll-apt.jar:
/Users/fharper/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/lib/titanium-verify.jar:Manifest.class:R.class:AssetCryptImpl.class:Insitu2TheProjectActivity.class:Insitu2TheProjectAppInfo.class:Insitu2TheProjectApplication.class" "-d"
"/Users/fharper/Documents/Code/TheProject/TheProject/build/android/bin/classes" "-proc:none" "-target" "1.6" "-source" "1.6" "@/Users/fharper/Documents/Code/TheProject/TheProject/build/android/java-sources.txt"
我收到以下错误
An uncaught exception was thrown!
Path must be a string. Received null
Path must be a string. Received null
我从未使用Titanium(6.0.1.GA - CLI 5.0.14),无法访问以前的开发人员,即使我知道JavaScript也没有使用多个Node(6.11.2) ,所以我被卡住了。我尝试过很多东西,比如更改Titanium SDK,Java JDK(1.8.0_121),Android SDK(6.0 API 23 rev 3),但没有任何效果,iOS现在正在运行。我甚至不确定这个错误发生在哪里。即使我使用AppceleratorStudio尝试运行应用程序,我也会遇到问题。
有什么想法吗?我花了太多时间在这上面,真的需要前进......非常感谢!
更新
运行appc run -p android --build-only -l trace
命令时,以下是完整日志(太大而无法直接粘贴到SO中):https://dl.dropboxusercontent.com/u/13087140/StackOverflow/build_android.log
答案 0 :(得分:2)
此问题的解决方案是将Android SDK工具从23.0.2升级到26.0.1,即使Appcelerator Titanium目前尚未测试和支持。
答案 1 :(得分:1)
这是appcelerator的一个已知问题,基本上,它还没有为某些配置修复 - 开发人员一直难以重现错误,所以看起来钛和节点的确切版本选择很重要。 / p>
决议:不会修复
一位用户的修复。
开发人员已经关闭了该问题,并且该问题是否已经解决存在冲突。
将关闭机票,因为它不会修复。确认我不再得到这个错误了 Appc CLI Core 5.4.0-36,内置Ti SDK 6.0.0.v20160728020336。
和
我仍然无法使用当前的GA堆栈重现此问题:
Appc CLI NPM:4.2.8
Appc CLI Core:6.1.0
SDK:6.0.1.GA
节点:v6.9.2
操作系统:Mac OS X(10.12.2)
如果可能,在运行移动项目时,请包含调试和跟踪日志:DEBUG = * appc run -l trace。
现在您正在使用:
Titanium(6.0.1.GA - CLI 5.0.14)
节点(6.11.2)
尝试将较旧的sdks用于钛和较早的节点版本。我不认为这是Android sdk的问题。
一位用户通过降级节点
解决了这个问题我使用node v4x解决了这个问题。它在我看到错误时使用的v6.x不起作用。
来自github:
appcelerator/titanium Path must be a string. Received undefined
来自开发者:
明确检查所有路径:
我要做的第一件事就是查看您的Appc CLI和Titanium CLI配置文件,看看是否有任何设置看起来像未定义,空或空的路径并修复它们。你可以在〜/ .appcelerator / appc-cli.json和〜/ .titanium / config.json找到它们。
并降级版本:
所以这是因为Node.js中的一些更改会影响5.5.1.GA.如果您的应用需要继续使用SDK 5.5.1.GA尝试将您的Node版本降级到4.X版本,否则升级到SDK 6.0.1.GA应该可以解决问题。
另一个值得一提的问题是卸载并安装新的sdks,以防当前使用您继承的项目导入的更改或缺陷。< / p>