我構建了一個基於VLC的播放器,並且當我想爲Android 6.0構建一個版本時,播放器無法在Android 6.0設備上啓動。以下是日誌:Can not加載vlcjni庫:java.lang.UnsatisfiedLinkError:dlopen失敗:/data/app/lib/arm/libvlcjni.so:有文本重定位。 我已經嘗試了很多方法來解決它,但我還沒有解決它。 我希望任何人都可以告訴我這個問題。無法在Android 6.0上加載vlcjni庫
回答
這裏是類似的問題和答案:libavcodec.so: has text relocations
Today, I got the same error messages when testing my app with Android 6.0 on a Nexus 6 (Motorola). I solved my issue by checking the targetSDKVersion in the manifest file. Using "22" and not "23" as targetSDKVersion solved it. (See below)
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="22" />
I also checked the build.gradle files for compile version and targetSDKversion:
compileSdkVersion 22 buildToolsVersion '22.0.1'
defaultConfig { minSdkVersion 15 targetSdkVersion 22 }
Hope this will help you. However, this is just a short term workaround for now, I hope that we will get some feedback from metaio though.
Regards, christin
我只需要創建我的Android庫中的libs文件夾,然後從jniLibs文件夾移到庫文件到libs文件夾。我相信這可能與更新版本的Gradle和構建工具有關。這樣,你不必降級你的構建工具/ Gradle。
UPDATE:
我是能夠建立與VLC-機器人下面的build.gradle腳本。我需要以下更新版本。這使我可以使用SDK版本24構建,包含構建工具24和gradle版本2.2.0。看看這是否適合你。
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'org.ajoberstar:gradle-git:1.3.2'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 24
buildToolsVersion '25.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
//noinspection GradleCompatible
compile "com.android.support:support-v4:25.2.0"
compile 'com.android.support:support-annotations:25.2.0'
}
- 1. 無法加載,但無法加載在android 2.1上的庫,但可以在2.2 +
- 2. 使用TidHTTP在Android上加載「無法加載SSL庫」錯誤
- 3. Android:無法加載庫
- 4. 無法在Android 6.0上保存下載的文件+
- 5. Glide無法在Android上正常加載
- 6. 我的Android APK無法在Android 6.0
- 7. Android Studio NDK:無法加載庫「libgnustl_shared.so」
- 8. Android NDK無法加載庫:reloc_library [1306]
- 9. QT的Android UnsatisfiedLinkError無法加載庫
- 10. Android:無法加載系統庫
- 11. 的Android NDK 8B無法加載庫
- 12. 無法加載庫
- 13. 無法從downloadManager Android 6.0 Marshmallow
- 14. 無法分享的Android 6.0
- 15. 無法加載WampServer上的捲曲庫
- 16. 無法在Tomcat 6.0上部署項目
- 17. 無法加載ggvis庫
- 18. 無法加載pywin32庫win32gui
- 19. 無法加載Bootstrap.css庫
- 20. java.lang.UnsatisfiedLinkError:無法加載庫
- 21. 庫無法正常加載
- 22. 無法加載動態庫
- 23. 笨無法加載庫
- 24. Codeigniter mPDF庫無法加載
- 25. 無法加載庫libvlc
- 26. libtool無法加載庫
- 27. 無法加載BIRT庫
- 28. WinRun4J - 無法加載庫罐
- 29. java.lang.UnsatisfiedLinkError:無法加載庫
- 30. SimpleCV無法加載OpenCV庫
是啊,我知道這種方式,它可以解決這個問題。但是這不是你知道,我們發佈了使用「23」作爲targetSDKVersion我們的APP最好way.As,我們不能將其更改爲「22」來解決這個問題。或者我們不能在GooglePlay上發佈我們的APP。 – iQiQi