VFY: unable to find class referenced in signature

最近蓝牙出现了一个无厘头的问题,build完系统之后,蓝牙pair是没问题的,但是传输数据就有问题了,出现下面的log:

I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
W/dalvikvm( 2869): VFY: unable to find class referenced in signature (Ljavax/obex/ServerSession;)
W/dalvikvm( 2869): VFY: unable to find class referenced in signature (Ljavax/obex/ServerSession;)
W/dalvikvm( 2869): VFY: unable to find class referenced in signature (Ljavax/obex/ServerSession;)
I/dalvikvm( 2869): Could not find method javax.obex.ServerSession.close, referenced from method com.android.bluetooth.pbap.BluetoothPbapService.closeService
W/dalvikvm( 2869): VFY: unable to resolve virtual method 3599: Ljavax/obex/ServerSession;.close ()V
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Failed resolving Lcom/android/bluetooth/pbap/BluetoothPbapAuthenticator; interface 510 'Ljavax/obex/Authenticator;'
I/dalvikvm( 2869): Could not find method javax.obex.ServerSession.close, referenced from method com.android.bluetooth.pbap.BluetoothPbapService.stopObexServerSession

一开始还以为真的是obex这个库出问题了,和其他有冲突? 没build进去? 结果都不是,obex没有任何修改,也看不到有什么问题。

找com/android/bluetooth/pbap/BluetoothPbapAuthenticator.java,也没发现它调用到obex没有的函数,因为连它都没改过,郁闷了我一整天,最后再仔细看看bluetooth这个apk到底修改了什么发现:

--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -17,6 +17,11 @@
         android:description="@string/permdesc_bluetoothWhitelist"
         android:protectionLevel="signature" />
 
+    <permission android:name="android.permission.ACCESS_FM_RECEIVER"
+        android:permissionGroup="android.permission-group.NETWORK"
+        android:protectionLevel="normal"
+        android:description="@string/permdesc_fm_receiver"
+        android:label="@string/permlab_fm_receiver" />
     <!--  Allows receiving handover status broadcasts from Bluetooth -->,
     <permission android:name="com.android.permission.HANDOVER_STATUS"
         android:label="@string/permlab_handoverStatus"
@@ -50,6 +55,9 @@
     <uses-permission android:name="android.permission.MANAGE_USERS"/>
     <uses-permission android:name="com.google.android.gallery3d.permission.GALLERY_PROVIDER"/>
     <uses-permission android:name="com.android.gallery3d.permission.GALLERY_PROVIDER"/>
+    <!-- For FM -->
+    <uses-permission android:name="android.permission.ACCESS_FM_RECEIVER" />
+    
 
     <!-- For PBAP Owner Vcard Info -->
     <uses-permission android:name="android.permission.READ_PROFILE"/>
@@ -58,6 +66,7 @@
         android:icon="@drawable/bt_share"
         android:persistent="false"
         android:label="@string/app_name">
+        <uses-library android:name="com.broadcom.bt" />
         <uses-library android:name="javax.obex" />
         <provider android:name=".opp.BluetoothOppProvider"
             android:authorities="com.android.bluetooth.opp"


增加了一个依赖com.broadcom.bt,结果是这个依赖没有build到target里面去。把它build到target之后问题解决。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值