简体   繁体   English

无法将JS文件或任何其他文件添加到Titanium项目文件夹

[英]Cant adding JS file, or any other, to a Titanium project folder

So i am making a mobile app. 所以我正在制作一个移动应用程序。 in this app, on my main screen, i have a button that when clicked it will load another frame, or js file. 在此应用程序的主屏幕上,我有一个按钮,单击该按钮将加载另一个框架或js文件。 this i know how to do but when pressing the button it gives me an error, "cant find file". 我知道该怎么做,但是当按下按钮时,它给了我一个错误,“找不到文件”。 after 3 hours of web searching i have tried changing the path names to every possible combination and moveing the file around. 经过3个小时的网络搜索,我尝试将路径名更改为每种可能的组合,并移动文件。 after doing so i came to realize that next to the new file i created, or any new file i create, there is an "*" and a question mark. 这样做之后,我开始意识到,在我创建的新文件或我创建的任何新文件旁边,都有一个“ *”和一个问号。 for example if i make a new file called login.js it will show up on the explorer window as *?login.js, where the question mark is much smaller symbol. 例如,如果我创建一个名为login.js的新文件,它将在资源管理器窗口中显示为*?login.js,其中问号是更小的符号。 Is there a manifest i must add it to, like in netbeans, because it seems as if there is an error in the file but it is empty. 是否有清单,我必须将清单添加到其中,就像在netbeans中一样,因为似乎文件中有错误,但它为空。

function signup(e){
    var menu = Ti.UI.createWindow({
        url: 'Main-Menu.js'
    });
    menu.open();
}

i also did: Titanium.include('/controllers/Main-Menu.js'); 我也做了:Titanium.include('/ controllers / Main-Menu.js'); but always getting the same error, the JS file is in my apps controller folder. 但总是出现相同的错误,该JS文件位于我的apps控制器文件夹中。

This *? 这个 *? indication comes from the git plugin that is shipped with Titanium Studio. 指示来自Titanium Studio随附的git插件。 It indicates that the file is not commited. 它指示文件未提交。

To answer your "can't find file" - question, I need to know some more details about your environment (target platform, sdk version, example code, ...) 要回答您的“找不到文件”-问题,我需要了解有关您的环境的更多详细信息(目标平台,sdk版本,示例代码等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM