小编IBr*_*IBr的帖子

如何设置gradle和android studio进行发布构建?

我想构建Android应用程序并开始签名.为此,我需要有apk的发布版本.Google文档仅提供了Eclipse和ant方法来发布版本:http://developer.android.com/tools/publishing/app-signing.html#releasecompile

但是我找不到如何强制gradle build release版本的apk.build.gradle也没有提供任何提示.gradlew tasks建议,没有安装Release配置,但存在卸载版本:

Install tasks
-------------
installDebug - Installs the Debug build
installTest - Installs the Test build for the Debug build
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build
uninstallRelease - Uninstalls the Release build
uninstallTest - Uninstalls the Test build for the Debug build
Run Code Online (Sandbox Code Playgroud)

我的build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
} …
Run Code Online (Sandbox Code Playgroud)

android release gradle android-studio android-gradle-plugin

71
推荐指数
6
解决办法
11万
查看次数

如何查询ffmpeg中的所有设备?

如何使用libavdevice正确查询系统中的所有视频设备?打开输入int err = avformat_open_input(&context, NULL, fmt, NULL);失败,因为未提供设备名称(第二个参数是设备名称,"/dev/video0"例如,如果提供,则仅找到该设备):

    avcodec_register_all();
    avdevice_register_all();
    AVFormatContext* context = avformat_alloc_context();
    AVInputFormat *fmt = av_find_input_format("video4linux");
    printf("trying to open input");
    int err = avformat_open_input(&context, "/dev/video0", fmt, NULL);
    if(err != 0){
        fprintf(stderr, "ffmpeg failed to open input");
    }
    static struct AVDeviceInfoList* devices_list;
    avdevice_list_devices(context, &devices_list);
    int devices_count = devices_list->nb_devices;
    for(int i = 0; i < devices_count; i++){
        printf("Checking device nr. %d \n", i);
        AVDeviceInfo* current_device_info = devices_list->devices[i];

       printf("Find Device: %s", current_device_info->device_description);
    }

    avformat_free_context(context);
Run Code Online (Sandbox Code Playgroud)

如何初始化 AVFormatContext 以查找所有 v4l2 …

ffmpeg v4l2

5
推荐指数
0
解决办法
1493
查看次数