0

Je suis nouveau au développement Android. Je développe l'application android en utilisant https://github.com/youtube/yt-watchme. Lorsque vous démarrez le streaming en direct, il se ferme de manière inattendue. Et dans ma console de studio Android, je reçois l'erreur suivante.Youtube Watchme erreur d'application android

09-18 10:33:26.427 16692-16692/? E/AndroidRuntime﹕ FATAL EXCEPTION: main 
    Process: com.google.android.apps.watchme, PID: 16692 
    java.lang.UnsatisfiedLinkError: Couldn't load Ffmpeg from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.google.android.apps.watchme-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.google.android.apps.watchme-2, /vendor/lib, /system/lib]]]: findLibrary returned null 
      at java.lang.Runtime.loadLibrary(Runtime.java:358) 
      at java.lang.System.loadLibrary(System.java:526) 
      at com.google.android.apps.watchme.Ffmpeg.<clinit>(Ffmpeg.java:26) 
      at com.google.android.apps.watchme.VideoStreamingConnection.open(VideoStreamingConnection.java:71) 
      at com.google.android.apps.watchme.StreamerService.startStreaming(StreamerService.java:80) 
      at com.google.android.apps.watchme.StreamerActivity.startStreaming(StreamerActivity.java:212) 
      at com.google.android.apps.watchme.StreamerActivity.access$200(StreamerActivity.java:47) 
      at com.google.android.apps.watchme.StreamerActivity$1.onServiceConnected(StreamerActivity.java:64) 
      at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1110) 
      at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1127) 
      at android.os.Handler.handleCallback(Handler.java:733) 
      at android.os.Handler.dispatchMessage(Handler.java:95) 
      at android.os.Looper.loop(Looper.java:136) 
      at android.app.ActivityThread.main(ActivityThread.java:5097) 
      at java.lang.reflect.Method.invokeNative(Native Method) 
      at java.lang.reflect.Method.invoke(Method.java:515) 
      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
      at dalvik.system.NativeStart.main(Native Method) 

S'il vous plaît aidez-moi à résoudre ce problème. Je suis vraiment coincé avec ce problème.

Code Mise à jour:

/* 
* Copyright (c) 2014 Google Inc. 
* 
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 
* in compliance with the License. You may obtain a copy of the License at 
* 
* http://www.apache.org/licenses/LICENSE-2.0 
* 
* Unless required by applicable law or agreed to in writing, software distributed under the License 
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 
* or implied. See the License for the specific language governing permissions and limitations under 
* the License. 
*/ 

package com.google.android.apps.watchme; 

/** 
* @author Ibrahim Ulukaya <[email protected]> 
*   <p/> 
*   FFmpeg class which loads ffmpeg library and exposes its methods. 
*/ 
public class Ffmpeg { 


    static { 
     System.loadLibrary("ffmpeg"); 
    } 

    public static native boolean init(int width, int height, int audio_sample_rate, String rtmpUrl); 

    public static native void shutdown(); 

    // Returns the size of the encoded frame. 
    public static native int encodeVideoFrame(byte[] yuv_image); 

    public static native int encodeAudioFrame(short[] audio_data, int length); 
} 

Répondre

2

Vous devez compiler bibliothèque FFmpeg et dans src/main/jniLibs/armeabi comme app bibliothèque native tente de charger System.loadLibrary("ffmpeg");

+0

Oui, j'utilise System.loadLibra ry ("ffmpeg"); code dans le fichier Ffmpeg.java J'ai mis à jour le code dans ma section ci-dessus. Quelque chose ne va pas là-bas? – Kichu

+0

vous n'avez pas compilé les fichiers ffmpeg.so – adnbsr

+0

Que puis-je faire pour cela? J'ai un nouveau développement android .can vous pouvez expliquer – Kichu

-1

Je pense que vous ne importer la bibliothèque Jni vous devez importer l'autre bibliothèque également que les fichiers .so, Click Here

+0

Bien que ce lien puisse répondre à la question, il est préférable d'inclure les parties essentielles de la réponse ici et fournir le lien pour référence. Les réponses à lien uniquement peuvent devenir invalides si la page liée change. - [Revue] (/ review/low-quality-posts/14043048) –

+0

Dans ce lien, vous pouvez voir la capture d'écran et la bibliothèque dont vous avez besoin pour la diffusion en direct youtube. –