无法在Android 6.0上加载vlcjni库

编程入门 行业动态 更新时间:2024-10-23 02:10:29
本文介绍了无法在Android 6.0上加载vlcjni库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我构建了一个基于播放器的VLC,并且当我想为Android 6.0构建版本时,播放器无法在Android 6.0设备上启动.这是日志:无法加载vlcjni库:java.lang .UnsatisfiedLinkError:dlopen失败:/data/app/lib/arm/libvlcjni.so:具有文本重定位. 我已经尝试了很多方法来解决它,但是我还没有解决. 我希望有人能告诉我这个问题.

I build a player based VLC,and when I want to build a verson for Android 6.0,player can't start on Android 6.0 device.Here are the log:Can't load vlcjni library:java.lang.UnsatisfiedLinkError:dlopen failed:/data/app/lib/arm/libvlcjni.so: has text relocations. And I have tried so many ways to solve it,but I haven't solve it yet. I hope anyone can tell me about the problem.

推荐答案

我只需要在Android库中创建一个libs文件夹,然后将库文件从jniLibs文件夹移至libs文件夹.我相信这可能与较新版本的Gradle和构建工具有关.这样,您不必降级您的构建工具/Gradle.

I only had to create a libs folder in my Android library, and then move the library files from the jniLibs folder to the libs folder. I believe this may have to do with the newer version of Gradle and build tools. That way, you don't have to downgrade your build tools/Gradle.

更新:

我能够使用以下适用于vlc-android的build.gradle脚本进行构建.我需要以下更新版本.这使我可以使用SDK版本24,构建工具24和gradle 2.2.0进行构建.看看这是否适合您.

I was able to build with the following build.gradle script for vlc-android. I needed the following updated versions. This allows me to build with SDK version 24, with build tools 24, and gradle version 2.2.0. See if this works for you.

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' }

更多推荐

无法在Android 6.0上加载vlcjni库

本文发布于:2023-11-27 09:24:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1637497.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   Android   vlcjni

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!