Android Titanium Appcelerator - 路径必须是字符串。收到空
Android Titanium Appcelerator - Path must be a string. Received null
我正在使用 Titanium 和 Alloy 开发一个项目,我终于能够 运行 iOS 版本,但是 [=35= 我遇到了错误] 当我 运行 appc ti build -p 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),无法访问以前的开发人员,也没有使用太多 Node (6.11.2),即使我知道 Java脚本,所以我卡住了。我尝试了很多东西,比如更改 Titanium SDK、Java JDK (1.8.0_121)、Android SDK (6.0 API 23 rev 3),但什么都没有有效,iOS 现在 运行ning。我什至不确定这个错误发生在哪里。即使我使用 AppceleratorStudio 尝试 运行 应用程序,我也有问题。
有什么想法吗?我在这上面花了太多时间,真的需要继续前进......非常感谢!
更新
这是我 运行 appc run -p android --build-only -l trace
命令时的完整日志(太大而无法直接粘贴到 SO 中):https://dl.dropboxusercontent.com/u/13087140/Whosebug/build_android.log
这是 appcelerator 的一个已知问题,基本上,它还没有针对某些配置得到修复 - 开发人员一直难以重现错误,因此看来 titanium 和 node 的确切版本选择很重要。
Resolution: Won't Fix
一个用户的修复。
开发者已关闭issue,是否已解决存在争议
Will close ticket as won't fix. Confirmed that I do not get this error any more with
Appc CLI Core 5.4.0-36 with Ti SDK 6.0.0.v20160728020336.
和
I am still unable to reproduce this issue with the current GA stack:
Appc CLI NPM: 4.2.8
Appc CLI Core: 6.1.0
SDK: 6.0.1.GA
Node: v6.9.2
OS: Mac OS X (10.12.2)
If possible, when running the mobile project, include the debug and trace logs: DEBUG=* appc run -l trace.
现在您正在使用:
钛 (6.0.1.GA - CLI 5.0.14)
节点 (6.11.2)
尝试对 Titanium 和较早的节点版本使用较旧的 SDK。我不认为这是 Android sdk 的问题。
一位用户通过降级节点解决了问题
I resolved it by using node v4x. It does not work with v6.x which I was using when I saw the error.
来自 github:
appcelerator/titanium Path must be a string. Received undefined
来自开发者:
所有路径的明显检查:
The first thing I would do is look at both your Appc CLI and Titanium CLI config files and see if there are any settings that look like paths that are undefined, null, or empty and fixing them. You can find them at ~/.appcelerator/appc-cli.json and ~/.titanium/config.json.
和降级版本:
So this happens because of some changes in Node.js that affect 5.5.1.GA. If your app needs to stay on SDK 5.5.1.GA try to downgrade your Node version to a 4.X version, otherwise upgrading to SDK 6.0.1.GA should fix the issue.
另一个始终值得一提的问题 - 是卸载并安装新的 sdk,以防在您继承的项目中导入的当前 sdk 发生一些变化或缺陷。
此问题的解决方案是将 Android SDK 工具从 23.0.2 升级到 26.0.1,即使 Appcelerator Titanium 目前尚未测试和支持。
我正在使用 Titanium 和 Alloy 开发一个项目,我终于能够 运行 iOS 版本,但是 [=35= 我遇到了错误] 当我 运行 appc ti build -p 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),无法访问以前的开发人员,也没有使用太多 Node (6.11.2),即使我知道 Java脚本,所以我卡住了。我尝试了很多东西,比如更改 Titanium SDK、Java JDK (1.8.0_121)、Android SDK (6.0 API 23 rev 3),但什么都没有有效,iOS 现在 运行ning。我什至不确定这个错误发生在哪里。即使我使用 AppceleratorStudio 尝试 运行 应用程序,我也有问题。
有什么想法吗?我在这上面花了太多时间,真的需要继续前进......非常感谢!
更新
这是我 运行 appc run -p android --build-only -l trace
命令时的完整日志(太大而无法直接粘贴到 SO 中):https://dl.dropboxusercontent.com/u/13087140/Whosebug/build_android.log
这是 appcelerator 的一个已知问题,基本上,它还没有针对某些配置得到修复 - 开发人员一直难以重现错误,因此看来 titanium 和 node 的确切版本选择很重要。
Resolution: Won't Fix
一个用户的修复。
开发者已关闭issue,是否已解决存在争议
Will close ticket as won't fix. Confirmed that I do not get this error any more with
Appc CLI Core 5.4.0-36 with Ti SDK 6.0.0.v20160728020336.
和
I am still unable to reproduce this issue with the current GA stack:
Appc CLI NPM: 4.2.8
Appc CLI Core: 6.1.0
SDK: 6.0.1.GA
Node: v6.9.2
OS: Mac OS X (10.12.2)
If possible, when running the mobile project, include the debug and trace logs: DEBUG=* appc run -l trace.
现在您正在使用:
钛 (6.0.1.GA - CLI 5.0.14)
节点 (6.11.2)
尝试对 Titanium 和较早的节点版本使用较旧的 SDK。我不认为这是 Android sdk 的问题。
一位用户通过降级节点解决了问题
I resolved it by using node v4x. It does not work with v6.x which I was using when I saw the error.
来自 github:
appcelerator/titanium Path must be a string. Received undefined
来自开发者:
所有路径的明显检查:
The first thing I would do is look at both your Appc CLI and Titanium CLI config files and see if there are any settings that look like paths that are undefined, null, or empty and fixing them. You can find them at ~/.appcelerator/appc-cli.json and ~/.titanium/config.json.
和降级版本:
So this happens because of some changes in Node.js that affect 5.5.1.GA. If your app needs to stay on SDK 5.5.1.GA try to downgrade your Node version to a 4.X version, otherwise upgrading to SDK 6.0.1.GA should fix the issue.
另一个始终值得一提的问题 - 是卸载并安装新的 sdk,以防在您继承的项目中导入的当前 sdk 发生一些变化或缺陷。
此问题的解决方案是将 Android SDK 工具从 23.0.2 升级到 26.0.1,即使 Appcelerator Titanium 目前尚未测试和支持。