1
2
3
| java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode
...
...
|
context.startActivityForResult
的 requestCode
有对应限制
对应源码为
1
2
3
4
5
6
7
| @Override
public void startActivityForResult(Intent intent, int requestCode) {
if (requestCode != -1 && (requestCode&0xffff0000) != 0) {
throw new IllegalArgumentException("Can only use lower 16 bits for requestCode");
}
super.startActivityForResult(intent, requestCode);
}
|