Building project in eclipse? - java

I've looked for an answer, no luck. Looked a lot.
I've downloaded an android example project from a friend, it's all in the correct layout, and the source files are there. Only I wish to open the whole project in eclipse, so that I can run it using the emulator I have installed. However, I cannot seem to be able to do this. I have all versions of android installed, and I have been advised that the files/project are for 2.3 so should be good. Have tried:
File --> New Android Project --> Using the existing file and build path
It suggested to do file --> Import instead, so went there and imported an android project from existing workspace.
It gave this error:
"Project has no default.properties file! Edit the project properties to set one".
Any help is much appreciated!

New version of ADT plugin uses project.properties while older version use default.properties.
Please upgrade ADT plugin. It will work

I had this problem when trying to open one of my projects on a different computer, you need to update the ADT. In Eclipse go to Help > Install New Software. Type in https://dl-ssl.google.com/android/eclipse/ and install the latest versions of everything. Also make sure everything to do with the SDK is up to date!

Try creating a new project from existing source.

Related

Can we use Android studio for AOSP development?

Can we use Android studio for AOSP(Android Open Source Project) development, is there a way to do it. I didnt find one. anybody got any idea on this please ?
You can use Android Studio as a IDE for AOSP, since it's just a modified version of InteliJ's IDE.
from AOSP root:
make idegen && development/tools/idegen/idegen.sh
Then just "Open Project" in Android Studio and select the android.ipr it generated.
To import AOSP source in Android Studio or Eclipse, follow the full instructions here :
https://android.googlesource.com/platform/development/+/master/tools/idegen/README
What Pedlar suggested above is one way of doing it. I ran into lot of Jar dependency issues when I tried it with IDEA community edition (Android Studio is a fork of IDEA IDE). The IDE keeps prompting you about duplicate jars etc. The generated project includes framework Java sources as well as App sources. I tried to build an App project which resulted in broken AOSP build. IMHO, IDEA is a great IDE for Java development. But didn't work well with AOSP.
What worked for me is using eclipse to browse/edit/debug framework sources, but build the code from a terminal window. To avoid AOSP build breaks, please create a shadow dir of AOSP (i.e. lndir of AOSP) and use shadow dir for eclipse project.
This is explained at Using eclipse to browse/edit AOSP link in step by step.
If you are working on AOSP, you might want to check Debugging Android framework services.

`AndEngine` Samples are not running on Eclipse by updating to Latest anddorid SDK and ADT

It was working fine but when i updated my eclipse to latest ADT and SDK it gave me this error.
12-15 14:58:07.501: E/AndroidRuntime(639): java.lang.NoClassDefFoundError: org.andengine.AndEngine
If any one faced this before then please help me, because of this my AndEngine projects are also giving me the same error.
Thanks.
I have solved this issue by following these steps.
First I created new Library called AndEngineLibs and add all AndEngine supporting libraries to it.
Then in the project properties->java build path->Order and Export is checked the AndEngineLibs
like shown. I don't know it is related or not but it worked for me :)
There are only three reasons you will ever get this error:
The class genuinely doesn't exist. If you are using code from an official example and getting this, make sure you have the latest build of the library
You have not added the jar to your build path. To fix this, right click on the jar in Eclipse, and do Build Path ► Add to Build Path.
Your jar is not in the /libs folder. This happens when you have added the jar to the build path, but newer versions of ADT need it to be in /libs. Put it there and re-add it to the build path.
Mostly, such errors occur because newer versions of the ADT require all external jars to be in the libs folder.

Android Project with ActionBarSherlock doesn't get built

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).

beginner at vaadin- getting error when I try to create a vaadin app

I am trying to create a UI for a java web app using Vaadin.
I am using Eclipse for this purpose, and I have installed the Google Plugin for Eclipse (which includes GWT SDK) as well as the Vaadin plugin for eclipse.
I created a new project using New Project-> New Vaadin Project... but I am seeing an error message in Eclipse console "GWT SDK not installed."
How do I resolve this error? I have already installed Google Plugin for Eclipse which includes GWT SDK.
Thanks...
Check in 'Preferences->Google->Web Toolkit' if you have existing SDK marked as default. Sometimes, after installing or unistalling other plug-ins, this may get reset to some older, not anymore existing, SDK version.
Also, make sure you have the default (or any other existing SDK) selected in project properties under 'your project->properties->Google->Web Toolkit->GWT SDK'.
Today I resolved this issue (which cropped up after a GWT SDK update on a perfectly working setup) by going to project Properties/Builders and moving the GWT "Google Web Toolkit Project Validator" up to just below Java Builder. I'd tried everything I could think of before that, including uninstalling and re-downloading the SDK, checking default and specific SDK's, trying older ones, editing .classpath entry manually.
Just in case poor some soul follows the path I went through. Using Eclipse Indigo.
help->check for updates
Update all libraries
then:
right-click the project, choose Project Properties->Java Build Path->Libraries
remove invalid GWT library, if any
choose Add Library, choose Google Web Toolkit
If an unknown version of the sdk is selected, click the Configure SDKs link and remove old versions or at least select the current, valid version.
Then, do a Project->clean just to be on the safe side, and your project should now build.
This worked for me using Eclipse Helios.

How can I add Java Template Project in Xcode 4?

I wanna know how can I add Java Template Project in Xcode 4.
I'm working with Eclipse and it's really fine but i want to write Java program in Xcode.
Thanks for helping. ;)
Java is not a first class citizen of Xcode anymore, so you should in my opinion stay with Eclipse.
I realise this question is 6 years old, but I have a similar problem and found what seems an easy solution. I have an old Java project (2008-9) which I maintain but has been dormant. As I prefer to keep it into Xcode I transferred the whole project (sources, project files and all paraphernalia) to a new development machine running el Capitan with Xcode 7.3.1. I opened the project (which was still in 3.1 version) with it, and tried to build it. It failed as Ant was missing. So I downloaded Ant (version 1.10.1) and copied its bin and lib directories under /usr/local/ant, then I changed the project external build tool configuration (under project, go to Info, and you'll see that parameter) which was set to /usr/bin/ant and set it to /usr/local/ant/bin/ant or wherever you put it. Build again and this time it worked.

Categories

Resources