eclipse is working fine with importing a project which already exist. But i am facing problem while am creating a new project in the android.
And then am trying to change the path in the properties of the project which i have created then it is showing some kind of error and screen shot of it is
Can any one help me in this.
Assuming your d: drive is an actual hard drive you have the android-sdk in, and not some DVD/CD drive you tried installing the android-sdk from.
You should click on your new android project folder, right-click and click on "close unrelated projects", then the right files will get generated correctly (re-initiate a manual rebuild if you have to).
The problem was that Eclipse was trying to rebuild all the projects you had in your workspace, a number of which already contained errors in them. Not only those other projects were clogging up your error log, but when an error is detected by the packager/builder, the building process gets stopped entirely.
Now just in case this wasn't your only problem, do Help > Check updates
After that, click on the menu Window > AVD Manager and something
and make sure that you have the latest SDKs and AVD updates already installed.
Also be aware that Pulsar is not the recommended version of Eclipse for doing Android development, although this probably wasn't what was causing your problem.
Related
I followed googles instructions and exported a test project from Eclipse by using the
Export -> Generate Gradle build files
opened up Android Studio and imported. After getting my support libraries working properly my project would compile with out any errors. My problem started when I tried to run the app on my device. When ever I try to run the app it directs me to use an AVD, never giving me the option to select my device. I obliged, created a new AVD but to no avail only to get build failed error. (I'll add the exact error when I can) NOTE: I can see my device is connected by clicking on "(6)Android" and the bottom left of the screen. I do see all logcat messages in verbose. I added android:debuggable="true"to my manifest but still nothing.
Confused I created a new project directly from Android Studio, hit run and bingo,...it gave me the option to use my device to run it or an AVD. Selecting either results in a successful launch of the dummy "Hello World" app. I think it may have something to do with build variants as my imported project doesn't specify "debug" vs "release" while the Android Studio generated project does.
Anyone else experiencing this?
I found the answer to my own question. Bit of a double whammy. Before installing Android Studio I updated my SDK via Eclipse (as recommended/required by google). Turns out by doing so a few items in my current projects got disconnected. ie. build paths, dependencies, ect. (you now have to place external Jar's in the src/libs folder)
Here is what I did to fix it.
In Eclipse, Preferences -> Java Built Path ->"Order and Export" tab. Make sure items are selected
If you have external Jars, manually copy and paste the jar in the libs folder of the project. (I did this in my Finder)
confirm the project launches via Eclipse
If it runs, export the project again by "Generate Gradle build files" (confirm overwriting existing files, if any)
5.Open Android Studio and re-import the project. Again, confirming overwriting of any existing files.
6.Next to the run bottom at the top of the screen click on the drop down next to your project name. Click "Edit Configurations..." and select "show chooser dialog" if not already selected.
clicked ok to exit,..and PRESTO!!! I finally have a successful project migration.
Hope this saves someone else time.
Cheers!
Yeah i have experienced similar stuff on Eclipse, its quite buggy. Since Android studio is based on it i would expect everything. Still the best solution to everything is to reload project, refresh project or restart IDE.
I recently reinstalled my OS, and used to have a PhoneGap / Android project. Now I want to use it again, so I reinstalled Eclipse and the ADT plug in. So far so good. Now the instructions say:
"Choose New > Android Project"
However, Android Project doesn't show up under new projects, like it used to.
http://www.adobe.com/devnet/html5/articles/getting-started-with-phonegap-in-eclipse-for-android.html
I downloaded phonegap-2.6.0, but perhaps it isn't connected to Eclipse... what do I do at this stage to get Android Project to show up?
If there is no 'Android Project' under the menu it is not about PhoneGap it is maybe about ADT, are you sure you installed it correctly ?
And, also you can create Android Project with PhoneGap by using 'command line', then you just go to the same menu:" New > Project " then choose Android Project with existing source choose the path you created before by command line and that's it.
edit1: Make sure you locate true directory for 'android-sdk-mac_x86'
edit2:this is how you create Android project by using Terminal
/path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
I had a similar problem. For me, Eclipse wouldn't respond when I clicked Finish when importing source from a phonegap project.
I later found that I had mentioned an incorrect path to the android-sdk.
Check if that is your problem.
If it is, here is how you change it:
In Eclipse IDE, click on the Window menu and then Preferences.
A pop-up will be opened.
On the left pane, click on Android (click on it, not on the + sign beside it).
In the field SDK Location, click Browse and point to the location of your android-sdk.
You are done!
Hope that helped.
EDIT:
I am using Eclipse Juno, but the options must hopefully be pretty much the same for other versions too. Please comment if this is incorrect.
I get a null pointer exception opening about half of the android XML files in my layout directory. There seems to be no pattern to why some files open and some files don't.
I upgraded eclipse to Juno. Re-installed all the plugins (ADT), re-installed the android SDK. I brought in my old workspace and adjusted my projects to point at the new android SDK.
Stack
java.lang.NullPointerException
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.setLocaleCombo(ConfigurationComposite.java:1566)
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.syncRenderState(ConfigurationComposite.java:3049)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.activated(GraphicalEditorPart.java:1158)
at com.android.ide.eclipse.adt.internal.editors.layout.LayoutEditorDelegate.delegatePageChange(LayoutEditorDelegate.java:679)
at com.android.ide.eclipse.adt.internal.editors.common.CommonXmlEditor.pageChange(CommonXmlEditor.java:359)
at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1081)
at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:607)
I found one way to resolve this. My eclipse recently crashed (and wouldn't start again) for an unrelated reason. To get it to start again I deleted most of the files in ${workspace}/.metadata/.plugins. These files regenerate (but will wipe some of your saved plugins and settings). Resolved my startup problem and my xml editor problem.
Just close all the xml files and restart your Eclipse SDK
An additional solution that worked for me and might work for others:
Create a new workspace and import your existing projects into it. I felt a little better about trying this than I did blowing away or moving my .plugins directory in the existing workspace. After I created the new workspace and imported the project that was giving me the cryptic "Failed to create parts controls" message, it worked fine. I'm pretty sure it's something bad in the .plugins or elsewhere in the old workspace, but I'll just keep using this new one until it starts to crap out on me.
Note that this can also happen if the containing folder contains too high a resolution
Example:
layout-sw500dp (this folder works okay)
layout-sw1000dp (this folder causes "Failed to create the part's controls" error)
I finally found out...
I had the problem even after deleting and setting a new copy of eclipse. The problem was because of the wrong Java version. You should find the right Java version for your eclipse.
In my case I have a project which uses Java 8 and for that I use eclipse Luna. But my other project which I develop it vie eclipse kepler uses java 6 (The project with the problem!).
Since Kepler and Java 8 are not compatible, I got this weird behavior from kepler. As soon as I ran Kepler via Java 6, everything was back to normal.
If you wanna know how to sets different Environment Variables and sets your Windows Path without setting up the Environment variable everytime for each project, let me know, I would be happy to share how to write a batch file to do that...
Using 3.6.2. When I choose to create a new Android Project, I enter a name, 'FirstProject' but the Finish button remains hollow and I cannot get past creating the project.
I did a little Google research and found a common cause of this is that the support folder that exists in the SDK's extras folder needs to be duplicated and the duplicate named to compatibility. I've done this now, and restarted Eclipse, but this still hasn't fixed the issue.
I also read that Juno causes this problem, but I'm not using Juno.
Has anyone experienced this problem before? Very eager to start an Android App!!
EDIT: A screen of the error:
You need to choose a Build SDK. If there is nothing in that drop-down, please visit the SDK Manager (Window > Android SDK Manager) and download one or more SDK platforms and associated emulators.
Make sure you add the SDK in Eclipse otherwise you will download them all and scratch your head on why they are not working.If you launch SDK manager form SDK folder and not from Eclipse it does not seem to register in Eclipse that you have downloaded these files. Took me several hours for something that should have taken only one or so.
I updated to the newest Android ADT and now every project in my workspace says error though there isn't any in the actual files. Even a clean Android project says error even though I have double checked all the preferences and I haven't found any fixes though I have investigated every possible help forum many times.
I have gotten many random error messages and here are just a few: "Current file is not a match for the given config.", "Conversion to Dalvik format failed with error 1" (not anymore), "Invalid preference page path: XML Syntax", "Failed to load properties file for project *" etc.
All my projects worked before updating.
None of the following works:
Cleaning the project, deleting the project and importing again, deleting libraries and temporary files and fixing project properties, unchecking the Is Library, updating the ProGruad, updating the Eclipse, moving Eclipse to C:\Eclipse, changing API levels and supported Android versions and so on...
I have fought with this problem for some time now.
EDIT:
The following things don't work either: Removing LibraryName_src files (my project has none).
EDIT:
I unchecked a checkbox in the general preferences which made Eclipse to delay the packing (I'll check the name of that checkbox later) and the current errors went away but now it says that "Could not find *.apk!"
I had weird errors too after updating my ADT plugin.
I solved it by performing an Android clear.
To do so just right click on yout Android project:
- Android tools
- Clear Lint Markers
It worked perfectly for me.
Recently had a similar problem. Try this:
Problem after recently after updating the ADT for Eclipse:
In your app project, check for any linked source folders pointing to your library projects (they have names in the form "LibraryName_src").
Select all those projects, right-click, choose "Build Path"->"Remove from Build Path".
Choose "Also unlink the folder from the project", and click "Yes".
Clean, rebuild and redeploy the project.
It seems the reason is that some previous version of ADT linked Library project source folders to the "child" projects, and the current ADT/Dex combination isn't compatible with that solution anymore.
(Solution found here: "Conversion to Dalvik format failed with error 1" on external JAR)
I solved it!
My jump from ADT 13 to 15 was too big. I backed up my workspace, removed everything releated to android and made a totally new SDK and Eclipse install.
After that I still got an error but deleting debug.keystore removed it.
I used Eclipse Indigo (version 3.7) and updated the CDT (instead of ADT) plugin to the latest version (cdt-master-8.0.1.zip). I experienced the same build path issues for all the existing projects that were working before I did the update. The issues that I faced were two folds:
The required source library link is missing from all the projects.
I lost my default Android SDK location in the Eclipse settings.
Here is how I fixed these two problems:
For Problem #1:
In Eclipse, click on the “Problems” tab to show the list of build errors.
Find an error that indicates certain class is not found. For example: “ClassABC cannot be resolved”
Double click on that error line would bring up the source code with the offending line, with a red dot x mark on the left edge of that offending line.
Double click on that red dot x mark would bring up a list of suggested solutions. At the bottom of the suggested list is the item of “Fix project setup…”.
Double click on the “Fix project setup…” would prompt you to add the link source library that is needed for the current project. Simply add that missing library to the project build path and click OK.
Now, do a “Refresh”, “Clean” and “Build Project” should give you a clear build, if nothing else causes errors.
For Problem #2:
In Eclipse, select from the menu bar “Window/Preferences…”, and then enter the missing Android SDK location. Click on OK button. That’s it.
These two steps basically restore all of my projects to the normal condition.
So if anyone is has been struggling with this after the latest ADT Plugin revision 22.
Be sure to install the Latest platform-tools as well.
To do this
Go to C:{Android SDK Location}\android\SDK Manager
And install the missing packages