I am trying to find the dependency for this import statement that I obtained from another program but unsuccessful so far.
import com.facebook.share.internal.ShareConstants;
That would be the Facebook android SDK. If you scroll a bit in the page below, you'll find instructions on how to use it in your project. You might want to inform yourself on the version of the SDK which the program was originally using, though, to avoid compatibility issues.
https://github.com/facebook/facebook-android-sdk
Related
I am using these two libraries in my project:
https://github.com/HemendraGangwar/VideoTrimmingLikeWhatsapp
https://github.com/fishwjy/VideoCompressor
Both libraries are imported locally to my project (i.e. copied them and added them to the project)
Both libraries work fine when used separately, but when I use them together I get some errors of type Program type already present which I solved by deleting the file isoparser-1.0.6.jar from the second library, because I noticed that the two libraries use the same library 'com.googlecode.mp4parser:isoparser' but with different versions: 1.1.21 for the first one and 1.0.6 for the second one.
When using only the old library, I get this code:
error: cannot find symbol class FileDataSourceViaHeapImpl
It is working now, but the problem the output video (after compression) does not have sound on it. How can I solve this?
Here is the code I am using for compressing the video (after trimming):
VideoController.getInstance().convertVideo(tmpFile.toString(), dstFile.toString(),
VideoController.COMPRESS_QUALITY_MEDIUM, null);
EDIT1
Summering the scenarios here with the same video:
VideoTrimmingLikeWhatsapp with verion 1.1.21 => works
VideoTrimmingLikeWhatsapp with verion 1.0.6 => does not works (compile error of missing classes)
VideoCompressor with 1.1.21 => does not work (no sound)
VideoCompressor with 1.0.6 => work
I tried a lot of things, and I am loosing tracks here. I also tried using SiliCompressor which seems also using version 1.0.6 of mp4isoparser, and the same problem is happening, output video has no sound. I posted an issue here a few days ago, but I don't think they will address this any time soon.
I also submitted here.
I tried downloading the mp4parser version 1.1.21 from here, and tried to import it locally so I can change the package names, but I couldn't because it using Maven not Gradle. The old version is a jar file, and I need to decompile it so I can mess with it. Can I do that?
I also tried using ffmpeg libraries, but all of them work very slowly compared to mp4isoparser
EDIT 2
The author of SiliCompressor has replied to the here I opened, he says that the problem should be solved by now. For the moment I am unable to verify it, as I no longer work on that project. If any one can confirm it, just tell me to add the answer to this topic.
This combination worked for me:
implementation 'com.iceteck.silicompressorr:silicompressor:2.2.3'
implementation ('com.googlecode.mp4parser:isoparser:1.0.6') {
exclude group: 'org.aspectj', module: 'aspectjrt'
}
Credit to: https://github.com/AndreyAsadchy
https://github.com/Tourenathan-G5organisation/SiliCompressor/issues/141#issuecomment-625308490
If the problem is really caused by the libraries version it is going to be tough to solve.
First I'd double check that. You said you tested the libs separately and that they worked, but, have you tried using the output of 'VideoTrimmingLikeWhatsapp' as input of 'VideoCompressor'?
I'm suspecting that 'VideoCompressor' does weird things with audio in some circumstances, somebody in this issues says there is no audio:
https://github.com/fishwjy/VideoCompressor/issues/1
If you get a video without sound using 'VideoCompressor' with his own version of 'isoparser' you can discard libraries version as the source of the problem.
Then, I think, you can: replace 'VideoCompressor': it seems to rely on Android libraries to perform the compression, you may implement that yourself, or you could find another library for doing the job. Or you can fix 'VideoCompressor': you could report the problem to the author or you could try to fix it yourself.
If you confirm the problem is the versions conflict: Then I can think several options, but none of them is easy:
You can try playing with classloaders and force each library to use their correct version of 'isoparser'. This alone can be difficult to do, besides that it can be very problematic in Android.
You can patch one version of isoparser, renaming package names (for example to com.googlecode.mp4parser_old ) so two versions of them can coexist, you should also patch the client library for using the new package names. This is very ugly but seems doable.
You can try to update 'VideoCompressor' to be compatible with isoparser-1.1.21. You could also ask the author to do it.
Again, you could replace 'VideoCompressor' (or may be 'VideoTrimmingLikeWhatsapp')
I'm aware this is not the definitive answer but I hope it helps you a little.
It's too late but i send this solution to be useful for others.
Yes, the problem is about version conflicts between the two libraries.
Solution:
Don't touch video compressor library at all.
Downgrade the "isoparser" dependency of video trimmer to the same version (1.0.6) with video compressor library dependency "isoparser".
Remove the following line from TrimVideoUtils.java file:
import com.googlecode.mp4parser.FileDataSourceViaHeapImpl;
Then change the following line:
Movie movie = MovieCreator.build(new FileDataSourceViaHeapImpl(src.getAbsolutePath()));
To
Movie movie = MovieCreator.build(src.getAbsolutePath());
It's done.
NOTE: Be careful about large files. Because this solution doesn't use memory mapping.
I'm building an Android app in Xamarin.Android. In Java terms, I need to import android.support.design.widget.CoordinatorLayout;. How can I do this with a C# using statement?
Xamarin intellisense won't let me go past using Android.Support. When I add .Design it tells me the using directive is unnecessary, and throws build errors.
Can you please help me?
It sounds like you're missing a component. Try including the Android Design Support Library component, I think it'll fix your problem.
If that doesn't work, try the steps listed in this question.
Double click on your packages folder inside your Xamarin Android project. The NuGet package search window will appear. In the search field (top right corner) type "Xamarin.Android.support.design". Select the package from Xamarin Inc.
Also helpful might be Xamarin.Android.Support.Contraint.Layout and Xamarin.Android.Support.Contraint.Layout.Solver. These are pre-release packages so you need to check the "Show pre-release packages" checkbox.
Use using Android.Support.Design.Widget; and make sure you're using the Xamarin.Android.Support.Design package from NuGet.
I've been trying to follow tutorials for javacv from various tutorial sites, but the biggest problem was that almost every single tutorials use cvCreate... methods to bring images and videos. But when I type those in, I can't find the methods in any libraries. I downloaded the latest javacv-bin file from bytedeco and added all the libraries from that download to my project, but it's still not working. Other classes such as Mat, CvCapture work perfectly. What can be the problem?
here's one tutorial i've been following:
https://www.youtube.com/watch?v=oliqc3B9Wrc&index=3&list=PLDk0xqo2QeH-4XZ93KH38jOoGOd60-2GO
P.S.
Can you recommand any javacv and java tutorial for beginners?
I'm stuck trying to use built in webcam on my laptop to do basic camera features such as capturing and recording.
Did you statically import packages like below ?
import static org.bytedeco.javacpp.opencv_core.*;
import static org.bytedeco.javacpp.opencv_imgproc.*;
import static org.bytedeco.javacpp.opencv_videoio.*;
I am getting an error on an import statement that I am using in order to try and implement Play Games with my app.
-The import com.google.android.gms.games.GamesClient cannot be resolved
I have BaseGameUtils referecncing google-play-services_lib, and my project references BaseGameUtils as a library.
It's my understanding that GameClient was to have been deprecated as of February 7, 2014 but when looking at Google's sample code (e.g. ButtonClicker) it still uses this import and some of the method calls from the import.
I got the code I am using from Google's GitHub sample app repository for the ButtonClicker2000, some of that code has been recycled and used in the program I'm having errors with as well.
This is all the info I can think to provide, if anything more would help please let me know.
I was struggling with the ButtonClicker2000 example for a couple days and I was having the same problem as yours.
I think the problem in the sample code is having some lines being not updated. If you look at that page, you can easily see that the updated versions of those lines are lying there. However the codes in GitHub page are not updated completely.
Because GamesClient class is removed permanently, those statements
GamesClient.EXTRA_PLAYERS
GamesClient.EXTRA_MIN_AUTOMATCH_PLAYERS
GamesClient.EXTRA_MAX_AUTOMATCH_PLAYERS
GamesClient.EXTRA_INVITATION
GamesClient.STATUS_OK
must be replaced with
Games.EXTRA_PLAYERS_IDS
Multiplayer.EXTRA_MIN_AUTOMATCH_PLAYERS
Multiplayer.EXTRA_MAX_AUTOMATCH_PLAYERS
Multiplayer.EXTRA_INVITATION
GamesStatusCodes.STATUS_OK
Also that line can be removed:
import com.google.android.gms.games.GamesClient;
There is no need for importing GoogleApiClient because it is already imported in GameHelper.java.
After changing these lines manually and importing Multiplayer and GamesStatusCodes classes, I was successful to compile the code. I hope that solves your problem as well.
I installed JavaME and EclipseME, and I'm trying to make a Hello World to my Nokia5530. But the imports are not working.
This page says that I need a "Device" file, but I don't know where to find it.. any idea?
Since it appears no on else is helping with this, I will start an answer, and put in my last comment into here.
OK, you need to install the Nokia SDK and then import it, as explained here, though your phone may not be series 60, you will need to d/l and then import the appropriate nokia sdk version: http://wiki.forum.nokia.com/index.php/Installing_Java_ME_development_tools_for_S60#Configuring_EclipseME
I haven't tried the suggestions here as I primarily develop on Windows at the moment, but the idea of using wine to install the SDK, and then move the files to an appropriate place on Linux sounds like a reasonable suggestion. I don't know if the suggestion below of compiling it yourself would be useful, but, there were some suggestions in the link below that may help you solve this particular problem.
http://www.wirelessforums.org/alt-cellular-nokia/nokia-sdk-linux-8895.html