I'm trying to install phoneRTC (https://github.com/alongubkin/phonertc) but its taking forever with git clone:
我正在尝试安装phoneRTC(https://github.com/alongubkin/phonertc),但它将永远使用git clone:
cordova plugin add https://github.com/alongubkin/phonertc.git
That's why I decided to just use wget on the zip file available at github:
这就是为什么我决定在github上提供的zip文件中使用wget:
wget https://github.com/alongubkin/phonertc/archive/master.zip
Now I have the plugin on my computer. I tried extracting the zip file and putting it on the plugins
directory of my project and renamed the folder to be the same as the id
in the config.xml
file:
现在我的电脑上有插件。我尝试解压缩zip文件并将其放在项目的plugins目录中,并将该文件夹重命名为config.xml文件中的id:
com.dooble.phonertc
But when I tried building the apk file I got the following error:
但是当我尝试构建apk文件时,我收到以下错误:
/home/wern/www/chatapp/chatapp/platforms/android/src/com/dooble/phonertc/PhoneRTCPlugin.java:316: error: cannot find symbol
webView.addView(_videoView, _videoParams);
^
symbol: method addView(VideoGLView,LayoutParams)
location: variable webView of type CordovaWebView
/home/wern/www/chatapp/chatapp/platforms/android/src/com/dooble/phonertc/PhoneRTCPlugin.java:336: error: cannot find symbol
webView.removeView(_videoView);
^
symbol: method removeView(VideoGLView)
location: variable webView of type CordovaWebView
/home/wern/www/chatapp/chatapp/platforms/android/src/com/dooble/phonertc/PhoneRTCPlugin.java:420: error: cannot find symbol
webView.removeView(_videoView);
^
symbol: method removeView(VideoGLView)
location: variable webView of type CordovaWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
3 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJava'.
> Compilation failed; see the compiler error output for details.
Any ideas what's wrong? did I miss something? thanks in advance
有什么想法有什么不对吗?我错过了什么?提前致谢
2 个解决方案
#1
Uncompress the plugin and install it like this:
解压缩插件并按如下方式安装:
cordova plugin add /path/to/the/uncompressed/folder
#2
I had solve this issue by Relplacing
我通过Relplacing解决了这个问题
webView.addView(_videoView);
with
((WebView) webView.getView()).addView(_videoView);
and
webView.addView(_videoView);
with
((WebView) webView.getView()).addView(_videoView);
I know this is an old question but hope will help someone.
我知道这是一个古老的问题,但希望对某人有所帮助。
#1
Uncompress the plugin and install it like this:
解压缩插件并按如下方式安装:
cordova plugin add /path/to/the/uncompressed/folder
#2
I had solve this issue by Relplacing
我通过Relplacing解决了这个问题
webView.addView(_videoView);
with
((WebView) webView.getView()).addView(_videoView);
and
webView.addView(_videoView);
with
((WebView) webView.getView()).addView(_videoView);
I know this is an old question but hope will help someone.
我知道这是一个古老的问题,但希望对某人有所帮助。