保证只运行一个应用程序的C#实现: using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;using System.Diagnostics;using System.Reflection;using System.Runtime.InteropServices; namespace JackLib.App{ static class Program {
问题描述:在接游戏sdk的时候,由于游戏要求购买的时候是在主线程里面进行的,但是发http请求是不能在主线程里面发,否则就会出现android.os.NetworkOnMainThreadException的异常 解决方法,新开线程 new Thread(){ public void run(){ userInfo= HttpRequest.sendGet(URL, param); Message msg = new Message(); Bundle data = new Bundle();