diff --git a/uni_modules/uts-advance/utssdk/app-android/index.uts b/uni_modules/uts-advance/utssdk/app-android/index.uts index 1169d57d9b62b58d3ec2cc9f91f96662365d9d53..6febb54d46376b74165bbb524656b5b4280c13c5 100644 --- a/uni_modules/uts-advance/utssdk/app-android/index.uts +++ b/uni_modules/uts-advance/utssdk/app-android/index.uts @@ -507,6 +507,23 @@ export class User { export function arrayConvert():boolean{ + + // kotlin.collections.List 转换 Array + let kotlinList = mutableListOf("hello","world") + let utsArr1 = Array.fromNative(kotlinList) + + if(!(utsArr1 instanceof UTSArray)){ + return false + } + + // kotlin.Array 转换 Array + let kotlinArray = arrayOf("hello","world") + let utsArr2 = Array.fromNative(kotlinArray) + + if(!(utsArr2 instanceof UTSArray)){ + return false + } + let b1 = byteArrayOf(-1,2,0,3,4,5) let c1 = Array.fromNative(b1) if(!(c1 instanceof UTSArray)){ @@ -533,6 +550,7 @@ export function arrayConvert():boolean{ return false } + return true }