如何为Windows Phone构建离子应用程序?

时间:2017-05-22 06:35:15

标签: windows ionic-framework ionic2 hybrid-mobile-app hybrid

错误:无法获取平台cordova-windows@~5.0.0 可能这是连接问题,或平台规格不正确。

2 个答案:

答案 0 :(得分:2)

ionic platform add windows ionic build windows --prod

并为您的应用添加偏好设置 <preference name="windows-target-version" value="10.0" />

答案 1 :(得分:0)

一些离子命令已经改变。要将Windows平台添加到离子应用程序运行public ArrayList<helpdesk> gethelpdeskList() { ArrayList<helpdesk> HelpdeskList = new ArrayList<helpdesk>(); Connection con = getConnection(); String query = "SELECT * FROM `ithelpdesk`"; Statement st; ResultSet rs; try { st = con.createStatement(); rs = st.executeQuery(query); helpdesk ithelpdesk; while(rs.next()) { ithelpdesk = new helpdesk(rs.getInt("Trackerno"),rs.getInt("scode"), rs.getString("sconcern"), rs.getString("sremarks"), rs.getString("createdby"),rs.getString("assignedby"),rs.getString("status")); } } catch (SQLException ex) { Logger.getLogger(hdesktable.class.getName()).log(Level.SEVERE, null, ex); } return HelpdeskList; } public void show_record(){ ArrayList<helpdesk> list = gethelpdeskList(); DefaultTableModel model =(DefaultTableModel) jtable_helpdesk.getModel(); Object[] row = new Object[7]; for(int i = 0; i<list.size();i++) { row[0] = list.get(i).getTrackerno(); row[1] = list.get(i).getscode(); row[2] = list.get(i).getsconcern(); row[3] = list.get(i).getsremarks(); row[4] = list.get(i).getcreatedby(); row[5] = list.get(i).assignedby(); row[6] = list.get(i).status(); model.addRow(row); } }