最近使用kotlin结合zxing开发,发现有些问题:
如果返回一个null值,在onActivityResult里面会报Parameter specified as non-null is null for data的错误。这个问题在java里并不会出现。原因在于kotlin有非空检查。如果直接使用onActivityResult的java源码转成kotlin的话,会发现
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {}
data:Intent那里少了一个问号,只要加上?就可以了。
相关推荐
produced when this parameter was a null string (""). Now, the original input filename is used as the AML output filename, with an ".aml" extension. Implemented a generic batch command mode for the ...
- improved split mechanism (added TfrxStretcheable.HasNextDataPart for complicated data like RTF tables) - improved crosstab speed when using repeat band with crosstab object version 4.9 ------------...
number of Network Addresses specified in Preferences->Network will be the number of NICs tested. This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. ...
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
When specified as false, checks for required views being non-null are elided and casts are no longer guarded with user-friendly error messages. This reduces the amount of generated code for release ...
In: inRef - The reference for the object item. Out: None Returns: Returns a reference counter if successful. For errors, returns $FFFFFFFF. -----------------------------------------------------...
more than one default gateway is specified for a given IP network or for multiple IP networks on different network cards, the first default gateway for the first network card is always used to route ...
It is optimized for low-bandwidth connections such as modems. Connecting via modem, screen refreshment rate reaches 5-10 updates per second. If connected to a LAN you can work on remote computer ...
The foreign key in a table T1 _____ the same _____ as the corresponding primary key in table T2. must have, name need not have, name must have, domain (a) I, II, and III (b) I and II (c) ...
The device must define an absolute or relative coordi-nate space in at least two dimensions for which it can return position data. The device must have a point-ing ap¬para¬tus or method (such as a ...
NX二次开发UF_DRF_set_specified_sbf_file 函数介绍,Ufun提供了一系列丰富的 API 函数,可以帮助用户实现自动化、定制化和扩展 NX 软件的功能。无论您是从事机械设计、制造、模具设计、逆向工程、CAE 分析等领域的...
A vehicular ad hoc network (VANET) is an emerging technology which has a great potential in realizing a variety of new applications. This paper presents a new packet routing scheme which allows a ...
Gets a message based on a key using the supplied args, as defined in MessageFormat, or null if no message is found. String getText(String aTextName, String defaultValue) Gets a message based on a...
ApiHooks allows to hook any API in specified process. ----------------------------------------------------- ApiHooks allows inserting module (with hooks) into the specified process. ApiHooks exports ...
Supports Telnet, SSH1, SSH2, ...Fires events when data is received, or key (even special) is pressed Allows transparent use of any of supported protocol. Change one property - leave other code the same!
TMyDumpOptions.FieldsAsString property for dumping all data types as string is added Bug with using quoted field names in the IndexFieldNames property is fixed Bug in TMyStoredProc with closing ...
在MySQL数据库操作中,"The user specified as a definer (‘mysql.infoschema’@’localhost’) does not exist" 是一个常见的错误提示,这通常发生在尝试执行存储过程、触发器或者视图等对象时,这些对象的定义者...
- re-implemented "options" parameter for additional options of connected devices (currently only used to set the speed reported by device and to specify an alternative redolog file of USB MSD disk ...