OpenVideoCall-Android-master集成报错


#1
 
在集成视频通话sdk报错,日志如下
Error:(5, 10) fatal error: 'agora/IAgoraRtcEngine.h' file not found
 
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing process D:\Java\adt-bundle-windows-x86_64-20131030\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\lijb\Downloads\OpenVideoCall-Android-master\app\src\main\cpp\Android.mk NDK_APPLICATION_MK=C:\Users\lijb\Downloads\OpenVideoCall-Android-master\app\src\main\cpp\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-14 NDK_OUT=C:/Users/lijb/Downloads/OpenVideoCall-Android-master/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\lijb\Downloads\OpenVideoCall-Android-master\app\build\intermediates\ndkBuild\debug\lib NDK_APPLICATION_MK:=src/main/cpp/Application.mk C:/Users/lijb/Downloads/OpenVideoCall-Android-master/app/build/intermediates/ndkBuild/debug/obj/local/x86/libapm-plugin-video-preprocessing.so}
[x86] Compile++      : apm-plugin-video-preprocessing <= video_preprocessing_plugin_jni.cpp
C:/Users/lijb/Downloads/OpenVideoCall-Android-master/app/src/main/cpp/video_preprocessing_plugin_jni.cpp:5:10: fatal error: 'agora/IAgoraRtcEngine.h' file not found
#include "agora/IAgoraRtcEngine.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [C:/Users/lijb/Downloads/OpenVideoCall-Android-master/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs/apm-plugin-video-preprocessing/video_preprocessing_plugin_jni.o] Error 1

#2

您好,请去官网下载最新的SDK并严格文档顺序进行集成,参考:

https://docs.agora.io/cn/user_guide/communication/windows_user_guide_communication.html#communication-quickstart-windows

#3

严格按照github上面说的配置的, OpenVideoCall-Android-master我这个是集成android,你给我发Windows的集成方式干嘛?

github上的OpenVideoCall-Android这个链接,请问还有什么步骤没有配置吗

#4

参考这个:https://docs.agora.io/cn/user_guide/communication/android_user_guide_communication.html#communication-quickstart-android


#5

头文件没找到,官网下SDK。


#6

好的,多谢,已经集成进去了,但是还有个报错问题
08-28 17:05:56.045 9955-9955/io.agora.openvcall E/AndroidRuntime: FATAL EXCEPTION: main
Process: io.agora.openvcall, PID: 9955
java.lang.RuntimeException: Unable to instantiate application io.agora.openvcall.AGApplication: java.lang.ClassNotFoundException: Didn’t find class “io.agora.openvcall.AGApplication” on path: DexPathList[[zip file “/data/app/io.agora.openvcall-1/base.apk”],nativeLibraryDirectories=[/data/app/io.agora.openvcall-1/lib/arm, /data/app/io.agora.openvcall-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:582)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4755)
at android.app.ActivityThread.access$1700(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1445)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5544)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Caused by: java.lang.ClassNotFoundException: Didn’t find class “io.agora.openvcall.AGApplication” on path: DexPathList[[zip file “/data/app/io.agora.openvcall-1/base.apk”],nativeLibraryDirectories=[/data/app/io.agora.openvcall-1/lib/arm, /data/app/io.agora.openvcall-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newApplication(Instrumentation.java:982)
at android.app.LoadedApk.makeApplication(LoadedApk.java:577)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4755)
at android.app.ActivityThread.access$1700(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1445)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:5544)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
Suppressed: java.lang.ClassNotFoundException: io.agora.openvcall.AGApplication
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
… 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
08-28 17:05:56.046 9955-9955/io.agora.openvcall E/MQSEventManagerDelegate: failed to get MQSService.


#7

java.lang.RuntimeException: Unable to instantiate application xxxx: java.lang.ClassNotFoundException: Didn’t find class “xxxx.Application” on path

这种一般都是 Instant Run 导致的。关闭它就可以了。