一、ijkplayer编译过程略,有兴趣的朋友可以再研究,以下以编译好的版本讲解。

将ijkplayer相关的so及aar文件复制到app下的libs目录,为支持多版本的手机使用,将所有的so文件都复制过去。

文件下载地址:https://download.csdn.net/download/wyydn_8476/10811260   版本为:0.8.4  不支持https。

有需要使用https的可以在此地址下载:https://download.csdn.net/download/wyydn_8476/10811332

文件结构如下:

二、在app的build.gradle中添加引用,最主要添加四块内容

        ndk {
// 设置支持的SO库架构
abiFilters 'armeabi' , 'x86','armeabi-v7a'//, 'x86_64', 'arm64-v8a'
}
    sourceSets.main {
jniLibs.srcDirs = ['libs']
}
    repositories {
flatDir {
dirs 'libs'
}
}
compile(name: 'ijkplayer-java-debug', ext: 'aar')

添加后完整app的build.gradle的代码如下:

apply plugin: 'com.android.application'

android {
compileSdkVersion
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.smallart.myapplication"
minSdkVersion
targetSdkVersion
versionCode
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
ndk {
// 设置支持的SO库架构
abiFilters 'armeabi' , 'x86','armeabi-v7a'//, 'x86_64', 'arm64-v8a'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets.main {
jniLibs.srcDirs = ['libs']
}
repositories {
flatDir {
dirs 'libs'
}
}
} dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile(name: 'ijkplayer-java-debug', ext: 'aar')
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.android.support:support-v13:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support:gridlayout-v7:26.0.0-alpha1'
compile 'com.android.support:mediarouter-v7:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:palette-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:support-annotations:26.0.0-alpha1'
}

三、添加ijkplayer工具类,工具类下载地址:https://download.csdn.net/download/wyydn_8476/10811874,添加完成后文件列表如下:

  修改所有的类的包引用。

四、添加res,主要修改和添加的文件如下,添加和修改的文件下载地址:https://download.csdn.net/download/wyydn_8476/10811878

  1.在values中添加strings_pref.xml文件。

  2.修改values中的strings.xml文件。

  3.在layout中添加activity_home.xml、table_media_info.xml、table_media_info_row1.xml、table_media_info_row2.xml、table_media_info_section.xml。

五、集成otto,到otto官网http://square.github.io/otto/下载jar包,并拷贝到到工程的libs下,并添加引用

compile 'com.squareup:otto:+'

配置完成后重新编译。

android studio 3.0 集成ijkplayer的更多相关文章

  1. Android Studio 1.0 (稳定版) 完全攻略

    这篇博文中主要从以下几点进行叙述: 1.Android Studio安装与使用 2.Android Studio特性 3.Android Studio优点 Android Studio 安装与使用 A ...

  2. Android Studio 3.0 新特性

    最新Android Studio版本是Android Studio 3.0,本文提供了所有新功能和更改的摘要. 所有这些功能都可以在最新的金丝雀版本中发布,但beta测试版本可能尚未提供. 核心IDE ...

  3. Android Studio 3.0 下载 使用新功能介绍

    谷歌2017发布会更新了挺多内容的,而且也发布了AndroidStudio3.0预览版,一些功能先睹为快.(英语一般,有些翻译不太好) 下载地址 https://developer.android.g ...

  4. Android Studio 项目中集成百度地图SDK报Native method not found: com.baidu.platform.comjni.map.commonmemcache.JNICommonMemCache.Create:()I错误

    Android Studio 项目中集成百度地图SDK报以下错误: java.lang.UnsatisfiedLinkError: Native method not found: com.baidu ...

  5. Android Studio 2.0 正式版公布啦 (首次中文翻译)

    Android Studio 2.0 公布了,添加了一些新特性: 1. 更加完好的 Instant Run 2. 更快的 Android Emulator 3.GPU Debugger Preview ...

  6. Android Studio 2.0 稳定版新特性介绍

    Android Studio 2.0 最终迎来了稳定版本号,喜大普奔. 以下这篇文章是2.0新特性的一些简介. 假设想看具体内容请看这里<Android Studio有用指南> 文章转自这 ...

  7. Android Studio 2.0使用指南

    一.下载界面.[无激活码 无序列码 无毒请放心使用][需将JAVA程序升级到1.8] 网址:http://www.android-studio.org/index.php/download/andro ...

  8. Android Studio 1.0.2项目实战——从一个APP的开发过程认识Android Studio

    Android Studio 1.0.1刚刚发布不久,谷歌紧接着发布了Android Studio 1.0.2版本,和1.0.0一样,是一个Bug修复版本.在上一篇Android Studio 1.0 ...

  9. Android Studio 1.0.1 + Genymotion安卓模拟器打造高效安卓开发环境

    我们开发安卓大多是使用Eclipse和安卓SDK中自带的安卓模拟器.当然,Google早就推出了自己的安卓开发环境——Android studio,在不久前,Google发布了Android Stud ...

随机推荐

  1. Android EditText 操作。。。

    EditText请求焦点三连击... editText.setFocusable(true); editText.setFocusableInTouchMode(true); editText.req ...

  2. ajaxfileupload.js上传文件兼容IE7及以上版本

    要兼容IE789,要修改ajaxfileupload.js;要将此处的代码替换掉 if(window.ActiveXObject) { var io = document.createElement( ...

  3. 简单全局HOOK拦截大部分键盘消息

    前言:学习HOOK中,万一老师讲解HOOK入门教程:http://www.cnblogs.com/del/category/124150.html http://www.cnblogs.com/del ...

  4. highstock无图像

    如果你的x轴是时间又是世纪秒的话又按以下设置的话,把xAxis的设置去掉试试看, 因为highstock会对世纪秒自动转换的 // xAxis: {// // max: 23, // min: 0, ...

  5. C# 13位时间戳转换成标准时间C#代码

    原地址:https://www.cnblogs.com/yixuehan/p/5559244.html /// <summary> /// 时间戳转换成标准时间 /// </summ ...

  6. css3边框与背景

    一.css3边框 1.border-image 边框 border-image: url(xxx.png) number stretch 很好理解就是拉伸,有多长拉多长. repeat (和4角上 同 ...

  7. 附加任务:团队作业7 Alpha冲刺

    附加任务:团队作业7 Alpha冲刺 附加任务要求参考东北师范大学陈志勇老师博客:https://edu.cnblogs.com/campus/nenu/2016SE_NENU/homework/19 ...

  8. python return 及lambda函数

    return有两个作用: 1.用来返回函数的运行结果,或者调用另外一个函数.比如max()函数 >>> def fun(a,b): #返回函数结果. return max(a,b) ...

  9. Java 几种锁

    自旋锁 自旋锁顾名思义,它会等待一定时间(自旋),在这期中会什么都不做就是等资源被释放,好处在于没有了内核态用户态切换的效率损失,但是如果它一直不能访问到资源的话就会一直占用cpu资源,所以它会循环一 ...

  10. pandas的日常笔记--查询