-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throwing a Fatal error #36
Comments
I think your copy and paste is wrong, Mjpeg.newInstance()
.credential("demo", "nxwitness")
.open("http://demo.networkoptix.com:7001/media/5bafc0e9-56be-97f8-5034-45a50cecf3d8.mpjpeg", TIMEOUT)
.subscribe(
inputStream -> {
mjpegView.setSource(inputStream);
mjpegView.setDisplayMode(calculateDisplayMode());
mjpegView.showFps(true);
},
throwable -> {
Log.e(getClass().getSimpleName(), "mjpeg error", throwable);
Toast.makeText(this, "Error", Toast.LENGTH_LONG).show();
}); |
Yeah I tried again, same error - |
Here is the full code as of right now: import com.github.niqdev.mjpeg.DisplayMode; import butterknife.BindView; public class MainActivity extends AppCompatActivity {
}` |
Uhm, just a question, have you tried the example from google play? Is it working? |
What's the name on Google play, but yeah I haven't . |
Have a look the README, java.io.FileNotFoundException: http://demo.networkoptix.com:7001/media/5bafc0e9-56be-97f8-5034-45a50cecf3d8.mpjpeg
at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238) That is like a 404 i.e. Not Found, in this case not supported I guess |
Dang that is not exactly my problem because I tried to do a wrong url to get a 404 but it still threw that original error .Granted doesn't matter since not of the formats provided by the API I'm using has the correct format for your program . Thanks anyway :) |
Having same problem. Just imported your lib to new project & got same exception. App from play market works well. |
All right, solved it by adding: apply plugin: 'com.android.application' To module gradle & adding your`s bintray.gradle |
Sorry for the late response, glad you found a solution. Thanks for sharing |
@spurd0 hi. your solution not work for me. Can you help me? |
@ulaserdegor what error have you got? Please share your build.gradle for app & project. |
@spurd0 same your error. my gradle files like yours. |
Here is my project's build.gradle
Pay attention to |
I just copied and pasted the code and changed the links around but can't get the example working, and like it is throwing a really strange error.
I think here is the code in question I belive:
private void loadIpCam() {
Mjpeg.newInstance()
.credential(getPreference("demo"), getPreference("nxwitness"))
.open(getPreference("http://demo.networkoptix.com:7001/media/5bafc0e9-56be-97f8-5034-45a50cecf3d8.mpjpeg"), TIMEOUT)
.subscribe(
inputStream -> {
mjpegView.setSource(inputStream);
mjpegView.setDisplayMode(calculateDisplayMode());
mjpegView.showFps(true);
},
throwable -> {
Log.e(getClass().getSimpleName(), "mjpeg error", throwable);
Toast.makeText(this, "Error", Toast.LENGTH_LONG).show();
});
}
and it throws this error in Android Studios, it looks like there is dependency missing somewhere or something?
Caused by: java.lang.NoSuchMethodError: No static method com_github_niqdev_mjpeg_Mjpeg$$Lambda$1_lambda$connect$0(Lcom/github/niqdev/mjpeg/Mjpeg;Ljava/lang/String;)Lrx/Observable; in class Lcom/github/niqdev/mjpeg/Mjpeg; or its super classes (declaration of 'com.github.niqdev.mjpeg.Mjpeg' appears in /data/app/danmax.javaalexa-2/base.apk)
The text was updated successfully, but these errors were encountered: