I'm trying to do Firebase Admin SDK app (with Java). I have included all the code that is provided on Firebase website, have downloaded firebase-admin library, but the problem is that I'm always missing some other library too.
I've spent my all day so far just downloading libraries. I try to compile my code, and get an error that I'm missing a library, when I download it, I'm missing the next one, and so on.
I mean, shouldn't there be some list of libraries that you need to have in for Firebase Admin SDK app? Are we really expected to download libraries just one by one all day long? There is no such list in official docs, they've just provied dependency for firebase-admin library, and I'm missing a BUNCH of others.
So in beginning I've had just firebase-admin-4.0.3 library, and I had to download the rest of these that are on the External libraries list, all one by one, and not knowing its Maven dependency at first.
Okay, problem solved. The problem was that I was using any kind of dependency manager like Maven or Gradle. I mean I was using Maven but I in another project just to download dependencies and then manually include them in project(stupid).
Related
I am learning one android project from youtube but that video is published 2 years ago. Now in order to use that code what changes i have to do in dependencies of libraries like room , Okhttp etcc and how can i update that project to latest verison easily?
If you add the dependencies as listed, they should still work - repositories keep the older versions, so projects built with a particular set of dependencies can pull those versions and build the same output no matter how old it is. Nothing has to update to a new version of a library - and many actively maintained projects will choose to stay on an older version of a dependency for lots of reasons!
That said, if you're creating a new project right now, some of the current Android framework libraries, plugins etc. might require certain versions of other dependencies - they might force you to meet some minimum version requirements, just because they're incompatible with older versions. You could either downgrade all the stuff that complains about needing a newer version of X, or you could upgrade your old dependencies, like you're asking about.
An easy way to do it is to open the Project Structure window in the File menu, and go to the Dependencies section. It'll show you all the dependencies in your project, identify which ones are out of date, and you can select an available version you want, or just update to the most recent version.
But if there is a compatibility issue, it might take some time to work out which versions are necessary, or even which versions are being pulled in by other libraries (e.g. a particular version of a library might internally have a dependency on a certain version of a library you're already using, and the most recent one is what your project ends up using). You can get some info about this from the output in the Build window, or maybe running the dependencies Gradle task if you want to explore that.
It wouldn't hurt to look at the project pages for your libraries and see what they say about installation and dependencies. Also, their method for adding them to a project might have changes, e.g. something that used the (now closed) JCenter repository might be using Jitpack now. Something to look at if you're having problems.
Also there's the issue that new versions of the libraries might have different APIs, or their behaviour might have changed. Even if fully updating everything goes smoothly, there might be stuff you need to fix in the code itself. Just a few things to keep in mind!
We have a very simple java SDK that can be imported in any android APP to do some basic tasks. One of the functionality of this SDK is to read the AAID, so we depend on Google-Play-Services.
Our current approach is use gradle java plugin and add the play-services.jar as a dependancy to our project. The latest versions of the google-play-services are packaged as .aar. So I need to know if there is any efficient way to do this or extract the aar and add the classes.jar as dependancy. While that will still work but I feel the entire solution is hacky.
I need to know what is the right way to get this done?
Thanks
I am trying to create an Android project and get the Bayeux Java Client library
working for it. I have the cometd library imported in my eclipse and I also added
the projects to the build path of my project.
My project builds fine, but on execution, I keep getting the NoClassDefFound error.
I am not sure, how to set my project up.
Are there any examples that I can refer to?
Any help is greatly appreciated.
Thanks,
I do the same thing and musst add some Other third party libraries. Check the NoClassDef Exception which class is needed and wasn't found. I Google the required class and add it to my libs folder. If i remember right it were some jetty client libs (3 or 4).
I implemented the current version of ActionBarSherlock to my Android Project.
Everything works fine and I don't get any errors.
But when I try to debug or export my project I don't get an .apk-file out of my project. Just a .jar-file with the name of my project.
I've read about some problems the SDK had with building projects that contain external libraries but this was at SDK version 14 and so I hope, this bug is fixed...
So there might be another cause for this problem.
Does anybody know a possible solution?
You cannot get *.jar file as the result of building Android project. This seems very strange to me. There must be something wrong with your project settings (if you changed them), or the project you build is of the wrong type (i.e. it is Java Application instead of Android Application).
You didn't mention which IDE do you use, but I assume you use Eclipse.
Make sure you have installed Android SDK and Eclipse ADT correctly (just in case).
Next thing to try is to create a new Android Application project from existing sources (there should be such option during the process of creation).
I've been tearing my hair out over this one, for the past 3 hours I've been trying to fix it but have been unable to. I've created an android app and I'm ready to put it on the android market but I get this error when trying to export to an apk.
Unable to execute dex: Multiple dex files define Lcom/google/ads/Ad;
I've read a bunch on the problem and tried quite a few solutions but nothing has seemed to help. I've cleaned and rebuilt, I've delete the bin folder, I've made sure that the bin folder is excluded build path. Nothing's worked. If anyone could help me I would really appreciate it.
Untick the admob jar file in the "order and export" part of the "configure build path".
On another post with a problem similar to yours the only thing mentioned that you have not already considered was updating Eclipse. I don't know how or what order that you have done these "fixes" but another poster mentioned that all at once he deleted the bin directory for his project, cleaned and rebuilt the project and restarted Eclipse. After that the error disappeared.
Good Luck- Lijap
For me the error was due to 2 different versions of AdMob SDK being included accidentally.
Removing one of them fixed it.
As other have noted, this problem should be due to multiple versions of Goodle's ad SDK classes being included in the app build. What I haven't seen yet is a note that the most recent Google Play Service lib includes classes that (at least) share the same names as some in the admob sdk-- for example, I came upon this error because I was trying to build with both admob sdk v.4.0.4 and the google-play-services_lib project as a referenced project; the latter contains google-play-services.jar which contains the package com.google.ads and many of the same classes as the admob sdk. Thus it appears that the google play services lib and the admob sdk cannot both be used in a given app. My solution was to remove the admob sdk entirely from the build.
I had the same or a similar problem. My problem was that my application imported a library which used a different version of AdMob SDK.
Details of my problem:
Library used AdMob SDK 6.3.0
Application used AdMob SDK 6.1.0
Fixed it by including the same version.
For me, I just have to take out the libs folder which contains android-support-v4.jar from build path and it worked.