项目不是用钛建造的

时间:2014-04-20 09:27:10

标签: android titanium

我用Titanium制作了一个带有桌子的项目。但是当我试图在我的手机上运行该项目时,它没有说“[ERROR]应用程序安装程序异常进程终止。进程退出值为1”。

似乎在处理javascript时出错。

这是我从调试中得到的:

Traceback (most recent call last):
  File "C:\Users\ProDigy SML\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\builder.py", line 2497, in <module>
    launch_logcat()
  File "C:\Users\ProDigy SML\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\builder.py", line 124, in launch_logcat
    adb_location = AndroidSDK(android_sdk_location).get_adb()
  File "C:\Users\ProDigy SML\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\androidsdk.py", line 49, in __init__
    self.set_api_level(api_level)
  File "C:\Users\ProDigy SML\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\androidsdk.py", line 53, in set_api_level
    self.find_platform_dir()
  File "C:\Users\ProDigy SML\AppData\Roaming\Titanium\mobilesdk\win32\3.2.2.GA\android\androidsdk.py", line 131, in find_platform_dir
    raise Exception("No \"%s\" or \"%s\" in the Android SDK" % ('android-%s' % api_level, android_api_levels[api_level]))
Exception: No "android-10" or "android-2.3.3" in the Android SDK

下面,您可以在主.JS文件中找到我正在使用的代码:

    // this sets the background color of the master UIView (when there are no windows/tabgroups on it)
Titanium.UI.setBackgroundColor('#000');

// create tab group
var tabGroup = Titanium.UI.createTabGroup();


//
// create base UI tab and root window
//
var win1 = Titanium.UI.createWindow({  
    title:'Categories Screen',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Categories Screen',
    window:win1
});

var label1 = Titanium.UI.createLabel({
    color:'#999',
    text:'Categories Screen',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});

win1.add(label1);

var data = [
    {title:"Art", hasChild:true, dest:'artCategory.js'}
];

var table = Ti.UI.createTableView({
    data: data,
    editable:'false',
    moving:'false'
});

table.addEventlistener('click', function(e){
    if(e.rowData.hasChild){
        var newWin = Ti.UI.createWindow({
            url: e.rowData.dest,
            title: e.rowData.title,
            backgroundColor: '#fff'
        });
        tab1.open(newWin);
    }
});

var view = Ti.UI.createView();

var editButton = Ti.UI.createButton({
    title: "Edit"
});

var doneButton = Ti.UI.createButton({
    title: "Done"
});

editButton.addEventListener('click', function(e){
    table.moving = 'true';
    table.editing = 'true';
    self.rightNavButton = doneButton;
});

doneButton.addEventListener('click', function(e){
    table.moving = 'false';
    table.editing = 'false';
    self.rightNavButton = editButton;
});

self.rightNavButton = editButton;
self.add(table);
return self;

win1.open;


//
//  add tabs
//
tabGroup.addTab(tab1);  


// open tab group
tabGroup.open(); 

有人可以帮助我,并告诉我问题是什么,以及如何解决它!

0 个答案:

没有答案