日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

推送SDK在初始化時報錯

問題詳述

推送SDK在初始化時報”java.lang.UnsatisfiedLinkError”或”TNET-JNI-LOAD-SO-FAIL“錯誤。

詳細報錯信息如下:

  1. java.lang.UnsatisfiedLinkError: No implementation found for int org.android.spdy.SpdyAgent.configLogFileN(java.lang.String, int, int) (tried Java_org_android_spdy_SpdyAgent_configLogFileN and Java_org_android_spdy_SpdyAgent_configLogFileN__Ljava_lang_String_2II)
  2. at org.android.spdy.SpdyAgent.configLogFileN(Native Method)
  3. at org.android.spdy.SpdyAgent.configLogFile(Unknown Source)
  4. at com.taobao.accs.net.e.<init>(Unknown Source)
  5. at com.taobao.accs.net.BaseConnection.a(Unknown Source)
  6. at com.taobao.accs.internal.ACCSManagerImpl.sendControlMessage(Unknown Source)
  7. at com.taobao.accs.internal.ACCSManagerImpl.bindApp(Unknown Source)
  8. at com.taobao.accs.a.a(Unknown Source)
  9. at com.taobao.agoo.AliyunRegister.register(Unknown Source)
  10. at com.alibaba.sdk.android.push.vip.AppRegister$a.b(Unknown Source)
  11. at com.alibaba.sdk.android.push.vip.AppRegister$a.a(Unknown Source)
  12. at com.alibaba.sdk.android.push.vip.b.handleMessage(Unknown Source)
  13. at android.os.Handler.dispatchMessage(Handler.java:102)
  14. at android.os.Looper.loop(Looper.java:148)
  15. at android.os.HandlerThread.run(HandlerThread.java:61)

  1. 04-20 11:34:02.035 15264-15383/cloud.aliyun.test E/awcn.TnetSpdySession: |[seq:AWCN2_2] connect exception org.android.spdy.SpdyErrorException: TNET_JNI_ERR_LOAD_SO_FAIL
  2. at org.android.spdy.SpdyAgent.checkLoadSo(Unknown Source)
  3. at org.android.spdy.SpdyAgent.agentIsOpen(Unknown Source)
  4. at org.android.spdy.SpdyAgent.createSession(Unknown Source)
  5. at org.android.spdy.SpdyAgent.createSession(Unknown Source)
  6. at anet.channel.d.l.b(Unknown Source)
  7. at anet.channel.SessionRequest.a(Unknown Source)
  8. at anet.channel.SessionRequest.a(Unknown Source)
  9. at anet.channel.SessionRequest$a.onFailed(Unknown Source)
  10. at anet.channel.k.onEvent(Unknown Source)
  11. at anet.channel.i.run(Unknown Source)
  12. at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
  13. at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  14. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
  15. at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
  16. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
  17. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
  18. at java.lang.Thread.run(Thread.java:818)

這是什么原因引起的?

問題原因

推送SDK包含有so包(libtnet、libcocklogic),出現上述錯誤都是由于so包沒有被成功加載導致的。請通過以下方法確認so包是被被正常添加:

將生成的.apk文件以.zip文件解壓,查看對應的jniLibs是否正確包含armeabi、armeabi-v7a、x86體系架構的目錄,檢查是否有移動推送的libcocklogic.so和libtnet.so

解決方案

  1. 通過遠程同步的方式集成推送SDK。推送SDK在V3.0.0及以上版本開始支持遠程同步集成,在遠程同步的過程中so包也被自動同步。推送SDK當前提供:armeabi,armeabi-v7a,arm64-v8a,mips,mips-64,x86,x86_64等架構的so包,如果您不需要這么多,可以在build.gradle文件中進行配置,選擇需要的so包:

    1. android {
    2. ......
    3. defaultConfig {
    4. applicationId "com.xxx.xxx"
    5. ......
    6. ndk {
    7. //選擇要添加的對應cpu類型的.so庫。
    8. abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a'
    9. // 還可以添加 'x86', 'x86_64', 'mips', 'mips64'
    10. }
    11. ......
    12. }
    13. ......
    14. }
  2. 手動添加so包,將所需架構的so包放到指定路徑默認為”src/main/jniLibs/‘’,若設置其他路徑如libs,需要手動在build.gradle文件中指定:

    1. android {
    2. compileSdkVersion 23
    3. buildToolsVersion "23.0.1"
    4. sourceSets {
    5. main {
    6. jniLibs.srcDirs = ['libs']
    7. }
    8. }
    9. }