Lập trình

Q & A cho các lập trình viên chuyên nghiệp và đam mê


30
SourceKitService chấm dứt
Tôi đang gặp sự cố với Xcode khi lỗi "Dịch vụ bộ nguồn bị chấm dứt" xuất hiện và tất cả tô sáng cú pháp và hoàn tất mã đã biến mất trong Swift. Làm thế nào tôi có thể sửa lỗi này? Đây là một hình ảnh ví dụ:





24
OnItemCLickListener không hoạt động trong listview
Activity mã lớp: conversationList = (ListView)findViewById(android.R.id.list); ConversationArrayAdapter conversationArrayAdapter=new ConversationArrayAdapter(this, R.layout.conversation_list_item_format_left, conversationDetails); conversationList.setAdapter(conversationArrayAdapter); conversationList.setOnItemClickListener(new AdapterView.OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { Log.d("test","clicked"); } }); Các getViewchức năng trong Adapterlớp: if (v == null) { LayoutInflater vi = (LayoutInflater)ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE); if(leftSideMessageNumber.equals(m.getTo())) { v = vi.inflate(R.layout.conversation_list_item_format_left, null); } …
242 android  listview 

15
C ++ nắm bắt mọi ngoại lệ
Có tương đương với c ++ của Java không try { ... } catch (Throwable t) { ... } Tôi đang cố gắng gỡ lỗi mã Java / jni gọi các hàm windows gốc và máy ảo tiếp tục gặp sự cố. Mã riêng xuất hiện tốt trong thử nghiệm …
242 c++  exception 



6
Chế độ xem web & localStorage trên Android
Tôi có một vấn đề với một webview có thể truy cập vào localStorage bởi một HTML5ứng dụng. Tệp test.html thông báo cho tôi rằng bộ nhớ cục bộ không được trình duyệt của tôi hỗ trợ (ví dụ webview:). Nếu bạn có bất kỳ đề nghị .. package com.test.HelloWebView; …





Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.