Android NDK 报错

No implementation found for void 
fix way:
check System.loadLibrary() is being called before the method is used.
FFmpeg show A/native-lib: Could not open input file
fix way:
request permission:
private static final int REQUEST_EXTERNAL_STORAGE = 1;
private static String[] PERMISSIONS_STORAGE = {
        "android.permission.READ_EXTERNAL_STORAGE",
        "android.permission.WRITE_EXTERNAL_STORAGE" };


public static void verifyStoragePermissions(Activity activity) {

    try {
    //检测是否有写的权限
        int permission = ActivityCompat.checkSelfPermission(activity,
                "android.permission.WRITE_EXTERNAL_STORAGE");
        if (permission != PackageManager.PERMISSION_GRANTED) {
    // 没有写的权限,去申请写的权限,会弹出对话框
            ActivityCompat.requestPermissions(activity, ISSIONS_STORAGE,REQUEST_EXTERNAL_STORAGE);
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Visual Studio 2017 离线安装包下载

注意:一定要安装到默认目录,否则cmake可能会无法识别

下载:
.\vs_Enterprise.exe --layout G:\xxx\vs2017layout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.WinXP --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP --add Microsoft.VisualStudio.Workload.ManagedDesktop --lang zh-CN

安装:
cd G:\xxx\vs2017layout\
.\vs_Enterprise.exe --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.WinXP --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.WinXP --add Microsoft.VisualStudio.Workload.ManagedDesktop




参数说明:
https://docs.microsoft.com/en-us/visualstudio/install/install-vs-inconsistent-quality-network
https://docs.microsoft.com/en-us/visualstudio/install/workload-and-component-ids