老的SDK文件这里没判断,把这句api.handleIntent(intent, this); 放在这里面就可以了
try {
api.handleIntent(intent, this);
} catch (Exception e) {
e.printStackTrace();
}
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
sContext = this;
Log.d(Tag,"onCreate");
Intent intent = getIntent();
api = WXAPIFactory.createWXAPI(this,APP_ID, true);
api.registerApp(APP_ID);
//api.handleIntent(intent, this);
try {
api.handleIntent(intent, this);
} catch (Exception e) {
e.printStackTrace();
}
if (intent.hasExtra(ReqWxLogin))
{
reqLogin();
}
finish();
}```