Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android上的Kaltura Java客户端库_Java_Android_Log4j_Kaltura - Fatal编程技术网

Android上的Kaltura Java客户端库

Android上的Kaltura Java客户端库,java,android,log4j,kaltura,Java,Android,Log4j,Kaltura,我正在编写一个Android API 10级应用程序,它捕获视频,然后上传到我们的Kaltura网站。这应该是直截了当的,因为Kaltura提供了一个Java客户机库(),他们在题为“Kaltura Android SDK参考应用程序实现指南”的文档中说要使用Java客户机库 好的,在编写了一个与Java客户端库示例相同的Kaltura上传类之后,Kaltura(在第一个链接上)显示了我的项目,包括Java客户端库“libs”文件夹中包含的所有构建引用,除了JUnit,因为Android已经有了

我正在编写一个Android API 10级应用程序,它捕获视频,然后上传到我们的Kaltura网站。这应该是直截了当的,因为Kaltura提供了一个Java客户机库(),他们在题为“Kaltura Android SDK参考应用程序实现指南”的文档中说要使用Java客户机库

好的,在编写了一个与Java客户端库示例相同的Kaltura上传类之后,Kaltura(在第一个链接上)显示了我的项目,包括Java客户端库“libs”文件夹中包含的所有构建引用,除了JUnit,因为Android已经有了自己的JUnit(包括JUnit导致构建失败),应用程序在构建新客户端对象期间抛出java.lang.VerifyError:

W/dalvikvm(8232): VFY: array-length on non-array
W/dalvikvm(8232): VFY:  rejecting opcode 0x21 at 0x000a
W/dalvikvm(8232): VFY:  rejected Lorg/apache/log4j/config/PropertySetter;.getPropertyDescriptor (Ljava/lang/String;)Ljava/beans/PropertyDescriptor;
W/dalvikvm(8232): Verifier rejected class Lorg/apache/log4j/config/PropertySetter;
W/dalvikvm(8232): Exception Ljava/lang/VerifyError; thrown while initializing Lorg/apache/log4j/LogManager;
W/dalvikvm(8232): Exception Ljava/lang/ExceptionInInitializerError; thrown while initializing Lcom/kaltura/client/KalturaClientBase;
D/AndroidRuntime(8232): Shutting down VM
W/dalvikvm(8232): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime(8232): FATAL EXCEPTION: main
E/AndroidRuntime(8232): java.lang.ExceptionInInitializerError
E/AndroidRuntime(8232):     at com.mysite.myapp.kaltura.KalturaUploader.<init>(KalturaUploader.java:32)
E/AndroidRuntime(8232):     at com.mysite.myapp.storage.LoginActivity.invokeKaltura(LoginActivity.java:105)
E/AndroidRuntime(8232):     at com.mysite.myapp.storage.LoginActivity.access$2(LoginActivity.java:102)
E/AndroidRuntime(8232):     at com.mysite.myapp.storage.LoginActivity$3.onClick(LoginActivity.java:81)
E/AndroidRuntime(8232):     at android.view.View.performClick(View.java:2506)
E/AndroidRuntime(8232):     at android.view.View$PerformClick.run(View.java:9112)
E/AndroidRuntime(8232):     at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(8232):     at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(8232):     at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(8232):     at android.app.ActivityThread.main(ActivityThread.java:3835)
E/AndroidRuntime(8232):     at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(8232):     at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(8232):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
E/AndroidRuntime(8232):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
E/AndroidRuntime(8232):     at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(8232): Caused by: java.lang.ExceptionInInitializerError
E/AndroidRuntime(8232):     at org.apache.log4j.Logger.getLogger(Logger.java:118)
E/AndroidRuntime(8232):     at com.kaltura.client.KalturaClientBase.<clinit>(KalturaClientBase.java:45)
E/AndroidRuntime(8232):     ... 15 more
E/AndroidRuntime(8232): Caused by: java.lang.VerifyError: org.apache.log4j.config.PropertySetter
E/AndroidRuntime(8232):     at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:684)
E/AndroidRuntime(8232):     at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:647)
E/AndroidRuntime(8232):     at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:544)
E/AndroidRuntime(8232):     at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:440)
E/AndroidRuntime(8232):     at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:476)
E/AndroidRuntime(8232):     at     org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
E/AndroidRuntime(8232):     at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
E/AndroidRuntime(8232):     ... 17 more
I/Process(8232): Sending signal. PID: 8232 SIG: 9
提前感谢您的帮助


编辑:浏览Kaltura代码,我发现一些可怕的东西,一定是这个生成的库的结果

// ===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _
//                          | ' </ _` | |  _| || | '_/ _` |
//                          |_|\_\__,_|_|\__|\_,_|_| \__,_| 
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2011  Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// @ignore
// ===================================================================================================
package com.kaltura.client.enums;

/**
 * This class was generated using generate.php
 * against an XML schema provided by Kaltura.
 * @date Wed, 18 Jul 12 07:10:33 -0400
 * 
 * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
 */
public enum KalturaFlavorReadyBehaviorType implements KalturaEnumAsInt {
    NO_IMPACT (0),
    REQUIRED (1),
    OPTIONAL (2),
    INHERIT_FLAVOR_PARAMS (0);

    public int hashCode;

    KalturaFlavorReadyBehaviorType(int hashCode) {
         this.hashCode = hashCode;
    }

    public int getHashCode() {
        return this.hashCode;
    }

    public static KalturaFlavorReadyBehaviorType get(int hashCode) {
        switch(hashCode) {
            case 0: return NO_IMPACT;
            case 1: return REQUIRED;
            case 2: return OPTIONAL;
            case 0: return INHERIT_FLAVOR_PARAMS;
            default: return NO_IMPACT;
        }
    }
}
//===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _

//|“客户机确实是自动生成的,随着Kaltura API的更新,服务器会在每次更新时生成新客户机,以提供客户机中的最新功能。 您可以在此处阅读有关Kaltura客户端Libs生成器的更多信息:

欢迎您认为可以改进客户端库的任何补丁或修改,请将其附加到此处或Kaltura.org上的问题线程

当前的Java客户端还不支持Android,它适合纯Java使用。
我们正在修改和创建一个Android特定的版本,我们非常感谢您提出的任何改进建议或补丁。

@Zohain.Babin我知道现在评论这个帖子已经很晚了。我刚刚开始使用kaltura sdk,它让我感到困惑。它提供了kaltura配置,kaltura客户端类wh9ic现在使用asynctask evry然后..我的意思是,在制作库的同时,多线程仍在农村地区使用..我想知道如何使用kaltura,包括改型库和其他库。请与kaltura develpomenadding@saltmiser分享您的宝贵经验
// ===================================================================================================
//                           _  __     _ _
//                          | |/ /__ _| | |_ _  _ _ _ __ _
//                          | ' </ _` | |  _| || | '_/ _` |
//                          |_|\_\__,_|_|\__|\_,_|_| \__,_| 
//
// This file is part of the Kaltura Collaborative Media Suite which allows users
// to do with audio, video, and animation what Wiki platfroms allow them to do with
// text.
//
// Copyright (C) 2006-2011  Kaltura Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//
// @ignore
// ===================================================================================================
package com.kaltura.client.enums;

/**
 * This class was generated using generate.php
 * against an XML schema provided by Kaltura.
 * @date Wed, 18 Jul 12 07:10:33 -0400
 * 
 * MANUAL CHANGES TO THIS CLASS WILL BE OVERWRITTEN.
 */
public enum KalturaFlavorReadyBehaviorType implements KalturaEnumAsInt {
    NO_IMPACT (0),
    REQUIRED (1),
    OPTIONAL (2),
    INHERIT_FLAVOR_PARAMS (0);

    public int hashCode;

    KalturaFlavorReadyBehaviorType(int hashCode) {
         this.hashCode = hashCode;
    }

    public int getHashCode() {
        return this.hashCode;
    }

    public static KalturaFlavorReadyBehaviorType get(int hashCode) {
        switch(hashCode) {
            case 0: return NO_IMPACT;
            case 1: return REQUIRED;
            case 2: return OPTIONAL;
            case 0: return INHERIT_FLAVOR_PARAMS;
            default: return NO_IMPACT;
        }
    }
}