I want to make a simple program using google translate API. I have an account and key already,but I am having trouble with the imports.
import com.google.api.GoogleAPI;
import com.google.api.translate.Language;
import com.google.api.translate.Translate;
They cannot be resolved. I am trying to follow these instructions:
https://code.google.com/p/google-api-java-client/wiki/Setup#google-api-client
but after extracting the google-api-java-client-1.17.0-rc.zip file and trying to add only the jar files I need, I cannot find the following:
jackson-core-asl-1.9.4.jar
protobuf-java-2.2.0.jar
xpp3-1.1.4c.jar
I have tried adding the entire google-api-services-translate-v2-rev27-1.17.0-rc-sources.jar file with maven and manually without maven. It shows up under referenced libraries and in the build configuration, but still does not achieve anything. I do not know if I am missing something important. I want to use it in a simple application, not having to do with android or google app engine. Please help! Thank you so much in advance!
You have to download this: http://google-api-java-client.googlecode.com/files/google-api-java-client-1.17.0-rc.zip
It contains the required libraries.
Related
I'm working on a Netbeans project and I'm trying to import these packages but It doesn't exist
Error Displayed
could someone tell me how to fix this problem
Thank you
Whenever you cannot find a package, you should download it from its source and then add it to your project. Here you can take a look at jOOQ/jOOL. As about the other two, make sure you are using Java 8. You will also need to know how to add packages to your projects in the future.
I have a basic java project wherein I have imported the jersey-client-1.19.jar externally in my java build (using eclipse). I am trying to write a basic jersey client to make a RESTful call to a web service. As soon as I try to import the ClientResponse class, eclipse complains about -
the type javax.ws.rs.ext.runtimedelegate$headerdelegate cannot be resolved. It is indirectly referenced from required .class files.
Eclipse auto correct takes me to my build paths. But I have had no luck fixing this. Googled for this but did not find anything.
I am missing something basic here. Any help is appreciated.
Never mind. Fixed it by trying to import jars from jersey library. The jsr311-api-1.1.1.jar import fixed the issue.
I started using android studio recently, and I'm following this guide but I can't seen to extend form, android studio highlights form in red and gives me the option to alt+enter. Once I alt+enter to import form, it show
import java.text.Normalizer;
but the guide show
import com.google.devtools.simple.runtime.components.android.Form;
"alt-enter" will give you options that are available on your local build. The tutorial gives you the assets and if they are not properly placed in your project, then this will not work.
You should be able to manually add the import:
import com.google.devtools.simple.runtime.components.android.Form;
If that fails, then I would assume that you did not properly add the ".jar" file in the tutorial. There are several ways to add jars (like put it in the "libs" folder). Do a search and you can select what works best for you and it should fix your problem.
Once it's properly imported into your project, you should see that import as an option. If you don't but manually entering it works, maybe restart Android Studio if that happens. Either way, you should have a good build at that point, and that's what matters.
I'm new to using freebase, so I'm going through the java sample provided on the Developers page. But when I run the code, I get errors because eclipse cannot recognize the packages that I'm importing. Does anyone know where I can download these packages in order to import them without errors. So my question is, where can I download the package com.freebase.samples
I've looked everywhere for the package but can't find it anywhere, is it discontinued and replaced by a newer package, if so does anyone know the name of the new package and where I can find it.
I don't know if this is what you are looking for, but the files have the package com.freebase.samples.
https://github.com/fatschi/FreebaseCrawl/tree/master/src/main/java/com/freebase/samples
After a lot of struggle and research I am writing this for help. Being a new in to Android and Java literally spent few days. I am sure I am missing something silly but need insight.
I am using Android studio and have added Zxing QR scanner in to my project. Now I want to edit few methods in the library to do some customisation. I have added the library via Gradle. This is the library I have used https://github.com/dm77/barcodescanner.
I have followed the basic instructions and added the library via gradle. Integration is successful. Now I want to customise the UI. So I got hold of the library here
When I got hold of ViewFindView and tried to edit the method, I wan not able to edit it. Then I realised it is a class and also auto generated. I am supposed to edit the Java files.
The respective java file with all the code in the methods is here
ViewFinderView.java
How do I use it?
Is there a way to get hold of the java files respect to those class files.
How can I edit those files so that I can customise them?
I think all the above questions are kind of same. What do I do?
I am happy to provide more information.
Greatly appreciate your time. Thanks in advance.
I have added the library via Gradle.
That is your problem. In order to add the library to your project you have to import it as a module instead.
Download the repository (either via git clone or download as zip from Github)
Import project as a module in Android Studio (File -> Import Module or File -> New -> Import Module)
Edit source files
You will need to make your changes to the files in the imported module not the ones found in the build directory.