================================================================================
【项目树形结构】
================================================================================
📁 MPV
│   📁 app
│   │   📁 src
│   │       📁 main
│   │       │   📁 java
│   │       │       📁 mpv
│   │       │           📁 jik
│   │       │               📁 exo
│   │       │               ├── 📄 GlobalApplication.java
│   │       │               └── 📄 MainActivity.java
│   │       │   📁 res
│   │       │   │   📁 drawable
│   │       │   │   └── ⛔ ic_launcher.png
│   │       │   │   📁 layout
│   │       │   │   └── 📄 activity_main.xml
│   │       │   │   📁 values
│   │       │   │   ├── 📄 colors.xml
│   │       │   │   ├── 📄 strings.xml
│   │       │   │   └── 📄 styles.xml
│   │       │       📁 values-v21
│   │       │       └── 📄 styles.xml
│   │       └── 📄 AndroidManifest.xml
│   ├── 📄 .gitignore
│   ├── 📄 build.gradle
│   └── 📄 proguard-rules.pro
├── 📄 .gitignore
├── 📄 build.gradle
├── 📄 gradle.properties
├── 📄 gradlew
├── 📄 gradlew.bat
├── 📄 local.properties
└── 📄 settings.gradle

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/.gitignore
项目内路径：/.gitignore
文件名：.gitignore
文件大小：8 字节
================================================================================
文件内容：
/build

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/.gitignore
项目内路径：/app/.gitignore
文件名：.gitignore
文件大小：6 字节
================================================================================
文件内容：
/build

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/build.gradle
项目内路径：/app/build.gradle
文件名：build.gradle
文件大小：1036 字节
================================================================================
文件内容：
apply plugin: 'com.android.application'

android {
    compileSdkVersion 33
    buildToolsVersion "33.0.0"

    defaultConfig {
        applicationId "mpv.jik.exo"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
	implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
    implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8' 
    implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8' 
    implementation 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'   
    implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
    implementation 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'
	implementation 'com.squareup.okhttp3:okhttp:4.9.3'
	implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
}

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/proguard-rules.pro
项目内路径：/app/proguard-rules.pro
文件名：proguard-rules.pro
文件大小：770 字节
================================================================================
文件内容：
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/AndroidManifest.xml
项目内路径：/app/src/main/AndroidManifest.xml
文件名：AndroidManifest.xml
文件大小：3307 字节
================================================================================
文件内容：
<?xml version='1.0' encoding='utf-8'?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="mpv.jik.exo">

    <!-- 完全的网络访问权限 -->
    <uses-permission android:name="android.permission.INTERNET"/>

    <!-- 运行前台服务 -->
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>

    <!-- 从共享存储空间读取音频文件 -->
    <uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>

    <!-- 读取共享存储空间中的图片文件 -->
    <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>

    <!-- 从共享存储空间读取视频文件 -->
    <uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>

    <!-- 计算应用存储空间 -->
    <uses-permission android:name="android.permission.GET_PACKAGE_SIZE"/>

    <uses-permission
        android:name="android.permission.READ_EXTERNAL_STORAGE"
        android:maxSdkVersion="32"/>

    <uses-feature
        android:name="android.hardware.touchscreen"
        android:required="false"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/Theme"
        android:supportsRtl="true">

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:screenOrientation="sensorLandscape">

            <intent-filter>

                <action android:name="android.intent.action.MAIN"/>

                <category android:name="android.intent.category.LAUNCHER"/>

            </intent-filter>

            <intent-filter>

                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>

                <category android:name="android.intent.category.BROWSABLE"/>

                <data android:scheme="http"/>

                <data android:scheme="https"/>

                <data android:scheme="rtsp"/>

                <data android:scheme="file"/>

                <data android:scheme="content"/>

                <data android:mimeType="video/*"/>

                <data android:mimeType="application/vnd.apple.mpegurl"/>

                <data android:mimeType="application/x-mpegurl"/>

                <data android:mimeType="application/dash+xml"/>

            </intent-filter>

            <intent-filter>

                <action android:name="android.intent.action.GET_CONTENT"/>

                <category android:name="android.intent.category.OPENABLE"/>

                <data android:mimeType="*/*"/>

            </intent-filter>

            <intent-filter>

                <action android:name="android.intent.action.MEDIA_BUTTON"/>

            </intent-filter>

        </activity>

        <service
            android:name=".PlaybackService"
            android:exported="false"
            android:foregroundServiceType="mediaPlayback"/>

        <receiver android:name=".MediaButtonReceiver">

            <intent-filter>

                <action android:name="android.intent.action.MEDIA_BUTTON"/>

            </intent-filter>

        </receiver>

    </application>

</manifest>

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/java/mpv/jik/exo/MainActivity.java
项目内路径：/app/src/main/java/mpv/jik/exo/MainActivity.java
文件名：MainActivity.java
文件大小：19368 字节
================================================================================
文件内容：
package mpv.jik.exo;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import tv.danmaku.ijk.media.player.IMediaPlayer;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;

public class MainActivity extends Activity implements 
SurfaceHolder.Callback, 
IMediaPlayer.OnPreparedListener,
IMediaPlayer.OnErrorListener, 
IMediaPlayer.OnCompletionListener, 
IMediaPlayer.OnInfoListener,
IMediaPlayer.OnBufferingUpdateListener,
IMediaPlayer.OnVideoSizeChangedListener {

    // UI组件
    private SurfaceView mSurfaceView;
    private SurfaceHolder mSurfaceHolder;
    private TextView mStatusTextView;
    private FrameLayout mVideoContainer;
    private RelativeLayout mLoadingLayout;
    private ProgressBar mProgressBar;
    private TextView mBufferingText;

    // 播放器相关
    private IjkMediaPlayer mMediaPlayer;
    private String mVideoPath;

    // 状态常量
    private static final int STATE_IDLE = 0;
    private static final int STATE_PREPARING = 1;
    private static final int STATE_PLAYING = 2;
    private static final int STATE_PAUSED = 3;
    private static final int STATE_COMPLETED = 4;
    private static final int STATE_ERROR = 5;
    private static final int STATE_BUFFERING = 6;
    private int mCurrentState = STATE_IDLE;

    // 缓冲进度
    private int mBufferingPercent = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        // 初始化UI组件
        initUI();

        // 初始化播放器
        initPlayer();

        // 处理Intent
        handleIntent(getIntent());
    }

    /**
     * 初始化UI组件
     */
    private void initUI() {
        mVideoContainer = (FrameLayout) findViewById(R.id.video_container);
        mStatusTextView = (TextView) findViewById(R.id.status_text);
        mLoadingLayout = (RelativeLayout) findViewById(R.id.loading_layout);
        mProgressBar = (ProgressBar) findViewById(R.id.progress_bar);
        mBufferingText = (TextView) findViewById(R.id.buffering_text);

        // 创建SurfaceView
        mSurfaceView = new SurfaceView(this);
        mSurfaceHolder = mSurfaceView.getHolder();
        mSurfaceHolder.addCallback(this);

        // 将SurfaceView添加到容器
        FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(
            FrameLayout.LayoutParams.MATCH_PARENT,
            FrameLayout.LayoutParams.MATCH_PARENT
        );
        mVideoContainer.addView(mSurfaceView, params);
    }

    /**
     * 初始化播放器
     */
    private void initPlayer() {
        try {
            // 加载IJK库
            IjkMediaPlayer.loadLibrariesOnce(null);
            IjkMediaPlayer.native_profileBegin("libijkplayer.so");
        } catch (Exception e) {
            e.printStackTrace();
            Toast.makeText(this, "播放器初始化失败: " + e.getMessage(), Toast.LENGTH_SHORT).show();
        }
    }

    /**
     * 处理Intent
     */
    private void handleIntent(Intent intent) {
        if (intent == null || intent.getAction() == null) {
            showWelcomeMessage();
            return;
        }

        String action = intent.getAction();

        if (Intent.ACTION_VIEW.equals(action)) {
            Uri videoUri = intent.getData();
            if (videoUri != null) {
                mVideoPath = videoUri.toString();
                showLoading("正在准备播放...");
                prepareVideo(mVideoPath);
            } else {
                showWelcomeMessage();
            }
        } else if (Intent.ACTION_MAIN.equals(action)) {
            showWelcomeMessage();
        }
    }

    /**
     * 准备播放视频
     */
    private void prepareVideo(String videoPath) {
        if (videoPath == null || videoPath.length() == 0) {
            showError("无效的视频路径");
            return;
        }

        try {
            releasePlayer();

            mMediaPlayer = new IjkMediaPlayer();

            // 根据视频类型配置播放器
            configurePlayerForFormat(videoPath);

            // 设置监听器
            mMediaPlayer.setOnPreparedListener(this);
            mMediaPlayer.setOnErrorListener(this);
            mMediaPlayer.setOnCompletionListener(this);
            mMediaPlayer.setOnInfoListener(this);
            mMediaPlayer.setOnBufferingUpdateListener(this);
            mMediaPlayer.setOnVideoSizeChangedListener(this);

            mCurrentState = STATE_PREPARING;

            // 设置数据源
            mMediaPlayer.setDataSource(videoPath);

            // 设置Surface
            if (mSurfaceHolder != null) {
                mMediaPlayer.setDisplay(mSurfaceHolder);
            }

            mMediaPlayer.prepareAsync();

        } catch (Exception e) {
            e.printStackTrace();
            showError("准备播放失败: " + e.getMessage());
        }
    }

    /**
     * 根据视频格式配置播放器
     */
    private void configurePlayerForFormat(String videoPath) {
        if (mMediaPlayer == null) return;

        try {
            // 重置所有选项
            mMediaPlayer.resetListeners();

            // 基本配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-auto-rotate", 1);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-handle-resolution-change", 1);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "opensles", 0);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "overlay-format", IjkMediaPlayer.SDL_FCC_RV32);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "framedrop", 5);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "enable-accurate-seek", 1);

            // 音频配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "soundtouch", 1);

            // 通用格式配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "http-detect-range-support", 0);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "dns_cache_clear", 1);

            // 网络配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "timeout", 10000000);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "reconnect", 1);

            // HTTPS配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "verify_ssl", 0);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "ssl_verify", 0);

            // 解码器配置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "skip_loop_filter", 48);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "min-frames", 100);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_CODEC, "max-buffer-size", 15 * 1024 * 1024);

            // 缓冲设置
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "packet-buffering", 0);
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "infbuf", 1);

            // 协议白名单
            String protocolWhitelist = "crypto,file,http,https,tcp,tls,udp,rtp,rtsp,rtmp";
            mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "protocol_whitelist", protocolWhitelist);

            // 根据文件扩展名配置特定格式
            String lowerPath = videoPath.toLowerCase();

            // HLS配置 (.m3u8)
            if (lowerPath.contains(".m3u8") || lowerPath.contains("hls") || lowerPath.contains("m3u8")) {
                configureForHLS();
            }

            // FLV配置 (.flv)
            else if (lowerPath.contains(".flv") || lowerPath.contains("flv")) {
                configureForFLV();
            }

            // MP4配置 (.mp4, .m4v)
            else if (lowerPath.contains(".mp4") || lowerPath.contains(".m4v")) {
                configureForMP4();
            }

            // RTSP配置 (海康摄像头)
            else if (lowerPath.startsWith("rtsp://")) {
                configureForRTSP();
            }

            // RTMP配置
            else if (lowerPath.startsWith("rtmp://")) {
                configureForRTMP();
            }

        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * HLS配置
     */
    private void configureForHLS() {
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "hls_list_size", 10);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "hls_time", 5);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "hls_allow_cache", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "hls_seek_by_byte", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "start-on-prepared", 0);

        // HLS缓冲优化
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "analyzeduration", 10000000L);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "probesize", 1024L * 1024 * 10);
    }

    /**
     * FLV配置
     */
    private void configureForFLV() {
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "flv_analyze_duration", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "flv_metadata", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "flv_prefer_audio", 0);

        // 实时流优化
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "packet-buffering", 0);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "infbuf", 1);
    }

    /**
     * MP4配置
     */
    private void configureForMP4() {
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "movflags", "faststart");
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "seek_by_bytes", 1);

        // MP4硬件解码优化
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-avc", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "mediacodec-hevc", 1);
    }

    /**
     * RTSP配置 (海康摄像头)
     */
    private void configureForRTSP() {
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp");
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_flags", "prefer_tcp");
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "stimeout", 5000000);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_buffer_size", 1024 * 1024 * 10);

        // 实时流低延迟
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "infbuf", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "packet-buffering", 0);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "framedrop", 10);
    }

    /**
     * RTMP配置
     */
    private void configureForRTMP() {
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_buffer", 3000);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_live", "live");
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtmp_swfverify", 0);

        // 实时流优化
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "infbuf", 1);
        mMediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "packet-buffering", 0);
    }

    /**
     * 显示欢迎消息
     */
    private void showWelcomeMessage() {
        if (mStatusTextView != null) {
            String welcomeText = "\n\n" +
                "请使用第三方APP调用使用";

            mStatusTextView.setText(welcomeText);
        }
        hideLoading();
    }

    /**
     * 显示加载中
     */
    private void showLoading(final String message) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (mStatusTextView != null) {
						mStatusTextView.setText(message);
					}
					if (mLoadingLayout != null) {
						mLoadingLayout.setVisibility(View.VISIBLE);
					}
				}
			});
    }

    /**
     * 隐藏加载
     */
    private void hideLoading() {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (mLoadingLayout != null) {
						mLoadingLayout.setVisibility(View.GONE);
					}
					if (mBufferingText != null) {
						mBufferingText.setVisibility(View.GONE);
					}
				}
			});
    }

    /**
     * 显示缓冲进度
     */
    private void showBuffering(final int percent) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (mBufferingText != null) {
						mBufferingText.setVisibility(View.VISIBLE);
						mBufferingText.setText("缓冲中... " + percent + "%");
					}
					if (mLoadingLayout != null) {
						mLoadingLayout.setVisibility(View.VISIBLE);
					}
				}
			});
    }

    /**
     * 显示错误
     */
    private void showError(final String error) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (mStatusTextView != null) {
						mStatusTextView.setText("错误: " + error);
					}
					hideLoading();
					mCurrentState = STATE_ERROR;
				}
			});
    }

    /**
     * 释放播放器资源
     */
    private void releasePlayer() {
        if (mMediaPlayer != null) {
            mMediaPlayer.stop();
            mMediaPlayer.release();
            mMediaPlayer = null;
        }
        mCurrentState = STATE_IDLE;
        mBufferingPercent = 0;
    }

    /**
     * 获取视频名称
     */
    private String getVideoName(String path) {
        if (path == null) return "未知视频";
        int lastSlash = path.lastIndexOf('/');
        if (lastSlash != -1 && lastSlash < path.length() - 1) {
            return path.substring(lastSlash + 1);
        }
        return path;
    }

    // =============== SurfaceHolder.Callback ===============
    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        if (mMediaPlayer != null) {
            mMediaPlayer.setDisplay(holder);
        }
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
        // Surface变化
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
        if (mMediaPlayer != null) {
            mMediaPlayer.setDisplay(null);
        }
    }

    // =============== IMediaPlayer 监听器 ===============
    @Override
    public void onPrepared(IMediaPlayer mp) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (mMediaPlayer != null) {
						mMediaPlayer.start();
						mCurrentState = STATE_PLAYING;
						hideLoading();
						String videoName = getVideoName(mVideoPath);
						mStatusTextView.setText("正在播放: " + videoName);
					}
				}
			});
    }

    @Override
    public boolean onError(IMediaPlayer mp, final int what, int extra) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					String errorMsg = "播放错误: ";
					if (what == IMediaPlayer.MEDIA_ERROR_UNKNOWN) {
						errorMsg += "未知错误";
					} else if (what == IMediaPlayer.MEDIA_ERROR_SERVER_DIED) {
						errorMsg += "服务器连接失败";
					} else if (what == IMediaPlayer.MEDIA_ERROR_IO) {
						errorMsg += "网络错误";
					} else if (what == IMediaPlayer.MEDIA_ERROR_MALFORMED) {
						errorMsg += "数据格式错误";
					} else if (what == IMediaPlayer.MEDIA_ERROR_UNSUPPORTED) {
						errorMsg += "不支持的格式";
					} else if (what == IMediaPlayer.MEDIA_ERROR_TIMED_OUT) {
						errorMsg += "连接超时";
					} else if (what == -10000) {
						errorMsg += "打开失败";
					} else {
						errorMsg += "错误码: " + what;
					}
					showError(errorMsg);
				}
			});
        return true;
    }

    @Override
    public void onCompletion(IMediaPlayer mp) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					mStatusTextView.setText("播放完成");
					mCurrentState = STATE_COMPLETED;
				}
			});
    }

    @Override
    public boolean onInfo(IMediaPlayer mp, final int what, int extra) {
        runOnUiThread(new Runnable() {
				@Override
				public void run() {
					if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_START) {
						mCurrentState = STATE_BUFFERING;
						showBuffering(mBufferingPercent);
					} else if (what == IMediaPlayer.MEDIA_INFO_BUFFERING_END) {
						if (mCurrentState == STATE_BUFFERING) {
							mCurrentState = STATE_PLAYING;
							hideLoading();
						}
					} else if (what == IMediaPlayer.MEDIA_INFO_VIDEO_RENDERING_START) {
						mStatusTextView.setText("正在渲染视频...");
					} else if (what == IMediaPlayer.MEDIA_INFO_AUDIO_RENDERING_START) {
						mStatusTextView.setText("正在渲染音频...");
					} else if (what == IMediaPlayer.MEDIA_INFO_VIDEO_TRACK_LAGGING) {
						showLoading("视频解码滞后...");
					} else if (what == IMediaPlayer.MEDIA_INFO_BAD_INTERLEAVING) {
						showError("数据交错错误");
					} else if (what == IMediaPlayer.MEDIA_INFO_UNSUPPORTED_SUBTITLE) {
						showError("不支持的字幕格式");
					} else if (what == IMediaPlayer.MEDIA_INFO_SUBTITLE_TIMED_OUT) {
						showError("字幕加载超时");
					}
				}
			});
        return false;
    }

    @Override
    public void onBufferingUpdate(IMediaPlayer mp, int percent) {
        mBufferingPercent = percent;
        if (mCurrentState == STATE_BUFFERING) {
            showBuffering(percent);
        }
    }

    @Override
    public void onVideoSizeChanged(IMediaPlayer mp, int width, int height, 
                                   int sarNum, int sarDen) {
        // 视频尺寸变化
    }

    // =============== Activity 生命周期 ===============
    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        handleIntent(intent);
    }

    @Override
    protected void onPause() {
        super.onPause();
        if (mMediaPlayer != null && mMediaPlayer.isPlaying()) {
            mMediaPlayer.pause();
            mCurrentState = STATE_PAUSED;
        }
    }

    @Override
    protected void onResume() {
        super.onResume();
        if (mMediaPlayer != null && mCurrentState == STATE_PAUSED) {
            mMediaPlayer.start();
            mCurrentState = STATE_PLAYING;
        }
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        releasePlayer();
        IjkMediaPlayer.native_profileEnd();
    }

    @Override
    public void onBackPressed() {
        if (mMediaPlayer != null && mMediaPlayer.isPlaying()) {
            mMediaPlayer.pause();
            mCurrentState = STATE_PAUSED;
            Toast.makeText(MainActivity.this, "播放已暂停", Toast.LENGTH_SHORT).show();
        } else {
            super.onBackPressed();
        }
    }
}

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/java/mpv/jik/exo/GlobalApplication.java
项目内路径：/app/src/main/java/mpv/jik/exo/GlobalApplication.java
文件名：GlobalApplication.java
文件大小：12199 字节
================================================================================
文件内容：
package mpv.jik.exo;

import android.app.Activity;
import android.app.Application;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.res.Resources;
import android.graphics.Typeface;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
import android.widget.HorizontalScrollView;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.Thread.UncaughtExceptionHandler;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.concurrent.atomic.AtomicBoolean;

public class GlobalApplication extends Application {

    private static Handler MAIN_HANDLER = new Handler(Looper.getMainLooper());

    @Override
    public void onCreate() {
        super.onCreate();
        CrashHandler.getInstance().registerGlobal(this);
        CrashHandler.getInstance().registerPart(this);
    }

    public static void write(InputStream input, OutputStream output) throws IOException {
        byte[] buf = new byte[1024 * 8];
        int len;
        while ((len = input.read(buf)) != -1) {
            output.write(buf, 0, len);
        }
    }

    public static void write(File file, byte[] data) throws IOException {
        File parent = file.getParentFile();
        if (parent != null && !parent.exists()) parent.mkdirs();

        ByteArrayInputStream input = new ByteArrayInputStream(data);
        FileOutputStream output = new FileOutputStream(file);
        try {
            write(input, output);
        } finally {
            closeIO(input, output);
        }
    }

    public static String toString(InputStream input) throws IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        write(input, output);
        try {
            return output.toString("UTF-8");
        } finally {
            closeIO(input, output);
        }
    }

    public static void closeIO(Closeable... closeables) {
        for (Closeable closeable : closeables) {
            try {
                if (closeable != null) closeable.close();
            } catch (IOException ignored) {}
        }
    }

    public static class CrashHandler {

        public static final UncaughtExceptionHandler DEFAULT_UNCAUGHT_EXCEPTION_HANDLER = Thread.getDefaultUncaughtExceptionHandler();

        private static CrashHandler sInstance;

        private PartCrashHandler mPartCrashHandler;

        public static CrashHandler getInstance() {
            if (sInstance == null) {
                sInstance = new CrashHandler();
            }
            return sInstance;
        }

        public void registerGlobal(Context context) {
            registerGlobal(context, null);
        }

        public void registerGlobal(Context context, String crashDir) {
            Thread.setDefaultUncaughtExceptionHandler(new UncaughtExceptionHandlerImpl(context.getApplicationContext(), crashDir));
        }

        public void unregister() {
            Thread.setDefaultUncaughtExceptionHandler(DEFAULT_UNCAUGHT_EXCEPTION_HANDLER);
        }

        public void registerPart(Context context) {
            unregisterPart(context);
            mPartCrashHandler = new PartCrashHandler(context.getApplicationContext());
            MAIN_HANDLER.postAtFrontOfQueue(mPartCrashHandler);
        }

        public void unregisterPart(Context context) {
            if (mPartCrashHandler != null) {
                mPartCrashHandler.isRunning.set(false);
                mPartCrashHandler = null;
            }
        }

        private static class PartCrashHandler implements Runnable {

            private final Context mContext;

            public AtomicBoolean isRunning = new AtomicBoolean(true);

            public PartCrashHandler(Context context) {
                this.mContext = context;
            }

            @Override
            public void run() {
                while (isRunning.get()) {
                    try {
                        Looper.loop();
                    } catch (final Throwable e) {
                        e.printStackTrace();
                        if (isRunning.get()) {
                            MAIN_HANDLER.post(new Runnable(){

                                    @Override
                                    public void run() {
                                        Toast.makeText(mContext, e.toString(), Toast.LENGTH_LONG).show();
                                    }
                                });
                        } else {
                            if (e instanceof RuntimeException) {
                                throw (RuntimeException)e;
                            } else {
                                throw new RuntimeException(e);
                            }
                        }
                    }
                }
            }
        }

        private static class UncaughtExceptionHandlerImpl implements UncaughtExceptionHandler {

            private static DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy_MM_dd-HH_mm_ss");

            private final Context mContext;

            private final File mCrashDir;

            public UncaughtExceptionHandlerImpl(Context context, String crashDir) {
                this.mContext = context;
                this.mCrashDir = TextUtils.isEmpty(crashDir) ? new File(mContext.getExternalCacheDir(), "crash") : new File(crashDir);
            }

            @Override
            public void uncaughtException(Thread thread, Throwable throwable) {
                try {

                    String log = buildLog(throwable);
                    writeLog(log);

                    try {
                        Intent intent = new Intent(mContext, CrashActivity.class);
                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                        intent.putExtra(Intent.EXTRA_TEXT, log);
                        mContext.startActivity(intent);
                    } catch (Throwable e) {
                        e.printStackTrace();
                        writeLog(e.toString());
                    }

                    throwable.printStackTrace();
                    android.os.Process.killProcess(android.os.Process.myPid());
                    System.exit(0);

                } catch (Throwable e) {
                    if (DEFAULT_UNCAUGHT_EXCEPTION_HANDLER != null) DEFAULT_UNCAUGHT_EXCEPTION_HANDLER.uncaughtException(thread, throwable);
                }
            }

            private String buildLog(Throwable throwable) {
                String time = DATE_FORMAT.format(new Date());

                String versionName = "unknown";
                long versionCode = 0;
                try {
                    PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0);
                    versionName = packageInfo.versionName;
                    versionCode = Build.VERSION.SDK_INT >= 28 ? packageInfo.getLongVersionCode() : packageInfo.versionCode;
                } catch (Throwable ignored) {}

                LinkedHashMap<String, String> head = new LinkedHashMap<String, String>();
                head.put("Time Of Crash", time);
                head.put("Device", String.format("%s, %s", Build.MANUFACTURER, Build.MODEL));
                head.put("Android Version", String.format("%s (%d)", Build.VERSION.RELEASE, Build.VERSION.SDK_INT));
                head.put("App Version", String.format("%s (%d)", versionName, versionCode));
                head.put("Kernel", getKernel());
                head.put("Support Abis", Build.VERSION.SDK_INT >= 21 && Build.SUPPORTED_ABIS != null ? Arrays.toString(Build.SUPPORTED_ABIS): "unknown");
                head.put("Fingerprint", Build.FINGERPRINT);

                StringBuilder builder = new StringBuilder();

                for (String key : head.keySet()) {
                    if (builder.length() != 0) builder.append("\n");
                    builder.append(key);
                    builder.append(" :    ");
                    builder.append(head.get(key));
                }

                builder.append("\n\n");
                builder.append(Log.getStackTraceString(throwable));

                return builder.toString(); 
            }

            private void writeLog(String log) {
                String time = DATE_FORMAT.format(new Date());
                File file = new File(mCrashDir, "crash_" + time + ".txt");
                try {
                    write(file, log.getBytes("UTF-8"));
                } catch (Throwable e) {
                    e.printStackTrace();
                } 
            }

            private static String getKernel() {
                try {
                    return GlobalApplication.toString(new FileInputStream("/proc/version")).trim();
                } catch (Throwable e) {
                    return e.getMessage();
                }
            }
        }
    }

    public static final class CrashActivity extends Activity {

        private String mLog;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);

            setTheme(android.R.style.Theme_DeviceDefault);
            setTitle("App Crash");

            mLog = getIntent().getStringExtra(Intent.EXTRA_TEXT);

            ScrollView contentView = new ScrollView(this);
            contentView.setFillViewport(true);

            HorizontalScrollView horizontalScrollView = new HorizontalScrollView(this);

            TextView textView = new TextView(this);
            int padding = dp2px(16);
            textView.setPadding(padding, padding, padding, padding);
            textView.setText(mLog);
            textView.setTextIsSelectable(true);
            textView.setTypeface(Typeface.DEFAULT);
            textView.setLinksClickable(true);

            horizontalScrollView.addView(textView);
            contentView.addView(horizontalScrollView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);

            setContentView(contentView);
        }

        private void restart() {
            Intent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());
            if (intent != null) {
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
            }
            finish();
            android.os.Process.killProcess(android.os.Process.myPid());
            System.exit(0);
        }

        private static int dp2px(float dpValue) {
            final float scale = Resources.getSystem().getDisplayMetrics().density;
            return (int) (dpValue * scale + 0.5f);
        }

        @Override
        public boolean onCreateOptionsMenu(Menu menu) {
            menu.add(0, android.R.id.copy, 0, android.R.string.copy)
                .setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
            return super.onCreateOptionsMenu(menu);
        }

        @Override
        public boolean onOptionsItemSelected(MenuItem item) {
            switch (item.getItemId()) {
                case android.R.id.copy:
                    ClipboardManager cm = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
                    cm.setPrimaryClip(ClipData.newPlainText(getPackageName(), mLog));
                    return true;
            }
            return super.onOptionsItemSelected(item);
        }

        @Override
        public void onBackPressed() {
            restart();
        }
    }
}

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/res/layout/activity_main.xml
项目内路径：/app/src/main/res/layout/activity_main.xml
文件名：activity_main.xml
文件大小：2041 字节
================================================================================
文件内容：
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000">

    <!-- 视频播放容器 -->
    <FrameLayout
        android:id="@+id/video_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#000000" />

    <!-- 加载提示 -->
    <RelativeLayout
        android:id="@+id/loading_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:background="#66000000"
        android:padding="20dp"
        android:visibility="gone">

        <ProgressBar
            android:id="@+id/progress_bar"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_centerHorizontal="true"
            android:indeterminateTint="#FFFFFF" />

        <TextView
            android:id="@+id/buffering_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/progress_bar"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="10dp"
            android:text="加载中..."
            android:textColor="#FFFFFF"
            android:textSize="14sp"
            android:visibility="gone" />

    </RelativeLayout>

    <!-- 状态和信息显示 -->
    <TextView
        android:id="@+id/status_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:minHeight="150dp"
        android:background="#000000"
        android:gravity="center"
        android:lineSpacingExtra="4dp"
        android:padding="20dp"
        android:text="初始化中..."
        android:textColor="#FFFFFF"
        android:textSize="16sp" />

</RelativeLayout>

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/res/values-v21/styles.xml
项目内路径：/app/src/main/res/values-v21/styles.xml
文件名：styles.xml
文件大小：928 字节
================================================================================
文件内容：
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- 基础主题 -->
    <style name="Theme" parent="@android:style/Theme.Material.Light.NoActionBar">
        <item name="android:colorPrimary">@color/colorPrimary</item>
        <item name="android:colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="android:colorAccent">@color/colorAccent</item>
        <item name="android:navigationBarColor">?android:colorPrimary</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>

    <!-- 全屏主题变体 -->
    <style name="Theme.FullScreen" parent="Theme">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowContentOverlay">@null</item>
    </style>
</resources>


【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/res/values/colors.xml
项目内路径：/app/src/main/res/values/colors.xml
文件名：colors.xml
文件大小：212 字节
================================================================================
文件内容：
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#009688</color>
    <color name="colorPrimaryDark">#00796B</color>
    <color name="colorAccent">#FF9800</color>
</resources>

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/res/values/strings.xml
项目内路径：/app/src/main/res/values/strings.xml
文件名：strings.xml
文件大小：109 字节
================================================================================
文件内容：
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">MPV</string>
</resources>

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/app/src/main/res/values/styles.xml
项目内路径：/app/src/main/res/values/styles.xml
文件名：styles.xml
文件大小：160 字节
================================================================================
文件内容：
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
	</style>
</resources>

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/build.gradle
项目内路径：/build.gradle
文件名：build.gradle
文件大小：1169 字节
================================================================================
文件内容：
buildscript {
    ext.build_gradle_version = '7.0.2'

    repositories {
        maven { url 'https://maven.aliyun.com/repository/public/' }
        maven { url 'https://maven.aliyun.com/repository/google/' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
        maven { url 'https://dl.bintray.com/ppartisan/maven/' }
        maven { url "https://clojars.org/repo/" }
        maven { url "https://jitpack.io" }
        google()
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:$build_gradle_version"
        
    }
    
}
allprojects {
    repositories {
        maven { url 'https://maven.aliyun.com/repository/public/' } 
        maven { url 'https://maven.aliyun.com/repository/google/' }
        maven { url 'https://maven.aliyun.com/repository/gradle-plugin/' }
        maven { url 'https://dl.bintray.com/ppartisan/maven/' }
        maven { url "https://clojars.org/repo/" }
        maven { url "https://jitpack.io" }
        mavenLocal()
        mavenCentral()
        google()
    }
	

        
	
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/gradle.properties
项目内路径：/gradle.properties
文件名：gradle.properties
文件大小：1091 字节
================================================================================
文件内容：
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app"s APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=false
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=false

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/gradlew
项目内路径：/gradlew
文件名：gradlew
文件大小：5296 字节
================================================================================
文件内容：
#!/usr/bin/env sh

##############################################################################
##
##  Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
        PRG="$link"
    else
        PRG=`dirname "$PRG"`"/$link"
    fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
    echo "$*"
}

die () {
    echo
    echo "$*"
    echo
    exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
  CYGWIN* )
    cygwin=true
    ;;
  Darwin* )
    darwin=true
    ;;
  MINGW* )
    msys=true
    ;;
  NONSTOP* )
    nonstop=true
    ;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
        # IBM's JDK on AIX uses strange locations for the executables
        JAVACMD="$JAVA_HOME/jre/sh/java"
    else
        JAVACMD="$JAVA_HOME/bin/java"
    fi
    if [ ! -x "$JAVACMD" ] ; then
        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
    fi
else
    JAVACMD="java"
    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
    MAX_FD_LIMIT=`ulimit -H -n`
    if [ $? -eq 0 ] ; then
        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
            MAX_FD="$MAX_FD_LIMIT"
        fi
        ulimit -n $MAX_FD
        if [ $? -ne 0 ] ; then
            warn "Could not set maximum file descriptor limit: $MAX_FD"
        fi
    else
        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
    fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
    JAVACMD=`cygpath --unix "$JAVACMD"`

    # We build the pattern for arguments to be converted via cygpath
    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
    SEP=""
    for dir in $ROOTDIRSRAW ; do
        ROOTDIRS="$ROOTDIRS$SEP$dir"
        SEP="|"
    done
    OURCYGPATTERN="(^($ROOTDIRS))"
    # Add a user-defined pattern to the cygpath arguments
    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
    fi
    # Now convert the arguments - kludge to limit ourselves to /bin/sh
    i=0
    for arg in "$@" ; do
        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option

        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
        else
            eval `echo args$i`="\"$arg\""
        fi
        i=$((i+1))
    done
    case $i in
        (0) set -- ;;
        (1) set -- "$args0" ;;
        (2) set -- "$args0" "$args1" ;;
        (3) set -- "$args0" "$args1" "$args2" ;;
        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
    esac
fi

# Escape application args
save () {
    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
    echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
  cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/gradlew.bat
项目内路径：/gradlew.bat
文件名：gradlew.bat
文件大小：2260 字节
================================================================================
文件内容：
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/local.properties
项目内路径：/local.properties
文件名：local.properties
文件大小：412 字节
================================================================================
文件内容：
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#sdk.dir=

【该文件结束】

================================================================================
【文件信息】
完整路径：/storage/emulated/0/AideProjects/MPV/settings.gradle
项目内路径：/settings.gradle
文件名：settings.gradle
文件大小：40 字节
================================================================================
文件内容：
include ':app'
rootProject.name = "MPV"

【该文件结束】

整合完成！总共处理 18 个文件。
