I've got my app working on iPhone (emulator and device).
But when the app starts running on the Android emulator, it crashes as soon as I use Ti.include() with a FileNotFoundException. I've tried changing the file paths from relative to absolute and this hasn't helped.
If I run it on the device I don't get this error. Anyone have any ideas? Or, does anyone know how to get output from the device via USB debugging? Does that output the log files to a console somewhere while it runs on a device?
If you set the log level to Trace, you can get details about the error.
You can use
adb -d logcatto get it in a console window or use the
ddmstool which is in the
Did you ever find the source of the FileNotFoundException in the emulator? I'm getting the same error.
I would second Don's answer for troubleshooting, and add that your should change/touch tiapp.xml to force a full rebuild of your project. Could be that JS files were not properly copied over. Also, you can reference JS files in Ti.include relative to
/, which is the Resources directory (like
Referencing files relative to the Resources directory using '/' doesn't seem to affect anything. When I look at the Trace output, it simply tells me to the same thing that the runtime error tells me: java.io.FileNotFoundException. But the file is right there, exactly where it should be, and the path it's reportedly looking in is exactly right. I've made sure to touch tiapp.xml and even remove the build folder completely, and the error doesn't go away.
Have a look in the build/android/bin/assets/Resources directory and make sure all js files have been copied.
I've been having the same issue, and manually copying the files over fixed this.