1. 程式人生 > >Android Studio "nativeLibraryDirectories=[/data/app/com.lukouapp-1/lib/arm64, /vendor/lib64, /system

Android Studio "nativeLibraryDirectories=[/data/app/com.lukouapp-1/lib/arm64, /vendor/lib64, /system

"nativeLibraryDirectories=[/data/app/com.lukouapp-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libxxxx.so" 

問題原因:64位機器預設去查詢arm64-v8a目錄下是否有合適的64位庫,如果沒有則回去libs下查詢32位的庫,而fresco的draw-pipeline太完善了考慮了64位的機器所以他的arm64-v8a下有so庫,

對應的系統就建立了lib64的檔案,而不再去找32位的庫。

解決方案:

Edit your build.gradle file as follows:


android {
  // rest of your app's logic
  splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64',

'arm64-v8a', 'armeabi-v7a', 'armeabi'
        universalApk false
    }
  }
}


(*)注意上面的紅色部分要刪除掉最後看起來是這樣:

android {
  // rest of your app's logic
  splits {
    abi {
        enable true
        reset()
        include 'x86', 'x86_64', 'armeabi-v7a', 'armeabi'
        universalApk false
    }
  }
}

參考:http://www.cnblogs.com/poe-blog/p/4728970.html