用T4Tdemo.apk调用SDK原生接口NfcAdapter.getDefaultAdapter报错

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

用T4Tdemo.apk调用SDK原生接口NfcAdapter.getDefaultAdapter报错

Jump to solution
3,250 Views
chenyuansen
Contributor III

在使用PN7160的过程中,用T4Tdemo.apk调用SDK原生接口NfcAdapter.getDefaultAdapter的时候报错,附件是完整的日志,是否可以帮忙看下是什么问题呢

--------- beginning of crash
11-20 16:48:10.196 E/AndroidRuntime( 2070): FATAL EXCEPTION: main
11-20 16:48:10.196 E/AndroidRuntime( 2070): Process: com.nxp.t4tdemo, PID: 2070
11-20 16:48:10.196 E/AndroidRuntime( 2070): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nxp.t4tdemo/com.nxp.t4tdemo.T4tActivity}: java.lang.UnsupportedOperationException
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3431)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.os.Handler.dispatchMessage(Handler.java:106)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.os.Looper.loop(Looper.java:223)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.ActivityThread.main(ActivityThread.java:7664)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at java.lang.reflect.Method.invoke(Native Method)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
11-20 16:48:10.196 E/AndroidRuntime( 2070): Caused by: java.lang.UnsupportedOperationException
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.nxp.nfc.NxpNfcAdapter.getNxpNfcAdapter(NxpNfcAdapter.java:63)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.nxp.t4tdemo.T4TFromNfccReaderWriter.<init>(T4TFromNfccReaderWriter.java:39)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.nxp.t4tdemo.T4tActivity.initNfcReferences(T4tActivity.java:53)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at com.nxp.t4tdemo.T4tActivity.onCreate(T4tActivity.java:46)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.Activity.performCreate(Activity.java:8022)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.Activity.performCreate(Activity.java:8006)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
11-20 16:48:10.196 E/AndroidRuntime( 2070): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3404)
11-20 16:48:10.196 E/AndroidRuntime( 2070): ... 11 more
11-20 16:48:10.204 I/DropBoxManagerService( 440): add tag=data_app_crash isTagEnabled=true flags=0x2
11-20 16:48:10.204 W/ActivityTaskManager( 440): Force finishing activity com.nxp.t4tdemo/.T4tActivity
11-20 16:48:10.209 D/PermissionCache( 181): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (230 us)
11-20 16:48:10.211 D/gralloc4( 223): [File] : hardware/rockchip/libgralloc/bifrost/src/hidl_common/Allocator.cpp; [Line] : 149; [Func] : allocate;
11-20 16:48:10.211 D/gralloc4( 223): got new private_handle_t instance @0xb4000077c2d57f50 for buffer 'screenshot'. share_fd : 8, share_attr_fd : 9, flags : 0x4, width : 1920, height : 1080, req_format : 0x1, producer_usage : 0x333, consumer_usage : 0x333, internal_format : 0x0, stride : 1920, byte_stride : 0, internalWidth : 0, internalHeight : 0, alloc_format : 0x1, size : 8294400, layer_count : 1, backing_store_size : 8294400, backing_store_id : 957777707090, allocating_pid : 223, ref_count : 1, yuv_info : 0
11-20 16:48:10.211 D/gralloc4( 223): plane_info[0]: offset : 0, byte_stride : 7680, alloc_width : 1920, alloc_height : 1080
11-20 16:48:10.211 D/gralloc4( 223): plane_info[1]: offset : 0, byte_stride : 0, alloc_width : 0, alloc_height : 0
11-20 16:48:10.254 I/Process ( 2070): Sending signal. PID: 2070 SIG: 9
11-20 16:48:10.386 I/ActivityManager( 440): Process com.nxp.t4tdemo (pid 2070) has died: fg TOP
11-20 16:48:10.395 E/WakeLock( 1194): IntentOp:.common.broadcast.BackgroundBroadcastReceiverSupport$PersistentReceiverIntentOperation should be held!
11-20 16:48:10.399 I/Zygote ( 258): Process 2070 exited due to signal 9 (Killed)
11-20 16:48:10.405 I/libprocessgroup( 440): Successfully killed process cgroup uid 10140 pid 2070 in 17ms
11-20 16:48:10.490 I/droid.launcher( 921): NativeAlloc concurrent copying GC freed 28279(1443KB) AllocSpace objects, 14(440KB) LOS objects, 49% free, 3977KB/7954KB, paused 121us total 223.629ms
11-20 16:48:10.520 I/GoogleInputMethodService( 1093): GoogleInputMethodService.onFinishInput():3301
11-20 16:48:10.523 I/GoogleInputMethodService( 1093): GoogleInputMethodService.onStartInput():1979
11-20 16:48:10.562 I/DeviceUnlockedTag( 1093): DeviceUnlockedTag.notifyDeviceLockStatusChanged():79 Notify device unlocked.
11-20 16:48:10.574 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.574 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.585 E/Layer ( 181): [Surface(name=Task=6)/@0xcb45f97 - animation-leash#0] No local sync point found
11-20 16:48:10.585 E/Layer ( 181): [Surface(name=Task=1)/@0x3b6e584 - animation-leash#0] No local sync point found
11-20 16:48:10.603 I/system_server( 440): Waiting for a blocking GC Alloc
11-20 16:48:10.693 I/ndroid.systemu( 592): NativeAlloc concurrent copying GC freed 45265(2235KB) AllocSpace objects, 0(0B) LOS objects, 46% free, 6999KB/12MB, paused 163us total 439.505ms
11-20 16:48:10.695 W/JavaBinder( 592): BinderProxy is being destroyed but the application did not call unlinkToDeath to unlink all of its death recipients beforehand. Releasing leaked death recipient: com.android.systemui.qs.external.TileLifecycleManager
11-20 16:48:10.695 I/BpBinder( 592): onLastStrongRef automatically unlinking death recipients: <uncached descriptor>
11-20 16:48:10.706 W/ActivityTaskManager( 440): Activity top resumed state loss timeout for ActivityRecord{5108e60 u0 com.nxp.t4tdemo/.T4tActivity t-1 f}}
11-20 16:48:10.714 I/system_server( 440): Waiting for a blocking GC Alloc
11-20 16:48:10.738 I/system_server( 440): Waiting for a blocking GC Alloc
11-20 16:48:10.738 I/system_server( 440): Waiting for a blocking GC Alloc
11-20 16:48:10.813 I/system_server( 440): Clamp target GC heap from 17MB to 16MB
11-20 16:48:10.813 I/system_server( 440): Alloc concurrent copying GC freed 8802(820KB) AllocSpace objects, 6(312KB) LOS objects, 31% free, 11MB/16MB, paused 235us total 239.022ms
11-20 16:48:10.813 I/system_server( 440): WaitForGcToComplete blocked Alloc on HeapTrim for 210.658ms
11-20 16:48:10.813 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.814 I/system_server( 440): WaitForGcToComplete blocked Alloc on HeapTrim for 100.094ms
11-20 16:48:10.815 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.816 I/DropBoxManagerService( 440): add tag=system_app_strictmode isTagEnabled=true flags=0x2
11-20 16:48:10.817 I/system_server( 440): WaitForGcToComplete blocked Alloc on HeapTrim for 79.462ms
11-20 16:48:10.817 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.818 I/system_server( 440): WaitForGcToComplete blocked Alloc on HeapTrim for 79.538ms
11-20 16:48:10.818 I/system_server( 440): Starting a blocking GC Alloc
11-20 16:48:10.825 V/WindowManager( 440): getPackagePerformanceMode -- ComponentInfo{com.android.launcher3/com.android.launcher3.uioverrides.QuickstepLauncher} -- com.android.launcher3 -- mode=0
11-20 16:48:10.843 I/mali_so ( 440): [File] : hardware/rockchip/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 1311; [Func] : base_context_deal_with_version_affairs_rk_ext;
11-20 16:48:10.843 I/mali_so ( 440): arm_release_ver of this mali_so is 'g2p0-01eac0', rk_so_ver is '8@0 '.
11-20 16:48:10.843 I/mali_so ( 440): [File] : hardware/rockchip/mali_so/driver/product/base/src/mali_base_kbase.c; [Line] : 1327; [Func] : base_context_deal_with_version_affairs_rk_ext;
11-20 16:48:10.843 I/mali_so ( 440): arm_release_vers are match. to set the full mali_ver 'g2p0-01eac0-x-8@0' as value of 'sys.gmali.version'.
11-20 16:48:10.864 I/hwservicemanager( 149): getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device manifest.
11-20 16:48:11.179 I/system_server( 440): Clamp target GC heap from 16MB to 16MB
11-20 16:48:11.180 I/system_server( 440): NativeAlloc concurrent copying GC freed 1454(237KB) AllocSpace objects, 0(0B) LOS objects, 31% free, 10MB/16MB, paused 257us total 167.051ms

0 Kudos
Reply
1 Solution
3,145 Views
chenyuansen
Contributor III
default code没有修改过

View solution in original post

0 Kudos
Reply
6 Replies
3,232 Views
danielchen
NXP TechSupport
NXP TechSupport

请问如何复制这个问题,使用的是什么MCU, 有没有完整的Log file

0 Kudos
Reply
3,225 Views
chenyuansen
Contributor III

您好,客户使用的是RK3566,完整log如附件

0 Kudos
Reply
3,206 Views
danielchen
NXP TechSupport
NXP TechSupport

能否把这个命令 写出来 便于我们分析,   “用T4Tdemo.apk调用SDK原生接口NfcAdapter.getDefaultAdapter"

0 Kudos
Reply
3,180 Views
chenyuansen
Contributor III

chenyuansen_0-1701063871556.png

加日志确认是T4Tdemo.apk这里返回空

0 Kudos
Reply
3,149 Views
danielchen
NXP TechSupport
NXP TechSupport

有没有修改default code,  还是只编译T4Tdemo?

0 Kudos
Reply
3,146 Views
chenyuansen
Contributor III
default code没有修改过
0 Kudos
Reply