Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

importing java com.google.* libraries [duplicate]

Tags:

java

android

I am having issues importing com.google.* libraries.

I am very new to eclipse and do not know how to import these libraries to fix my code errors. Can someone point me in the right direction to importing these libraries?

like image 377
gh9 Avatar asked Nov 28 '25 08:11

gh9


2 Answers

Import Google libraries the same way you do any others, with the Java import statement. Or in Eclipse, add them to the project build path.

This assumes, of course, you HAVE the Google libraries. If you're asking how to import than from a remote location (e.g., a Google server) that can't be done. You'll need to download them first to your project directory & go from there.

like image 100
aksarben Avatar answered Nov 30 '25 20:11

aksarben


The following line:

import com.google.*;

should do just fine. However, keep this in mind,

  • Doing import com.google.* does not import for instance import com.google.appengine.*

  • You need to have com.google.* on your class path. (Right click on the project and select "Configure class path" to add possibly missing jars / libraries.)

like image 20
aioobe Avatar answered Nov 30 '25 20:11

aioobe