Eclipse juno android xml editor missing buttons - android

I decided lately to start playing arround with some Android programming and I have a very wierd problem that I can not specify if it is caused by the version of Eclipse that I use (aka Juno). More specifically, when I open let's say the AndroidManifest.xml on eclipse Indigo at the bottom there are 5 buttons, Manifest, Application, Permission, Instrumentation and AndroidManifest.xml.
Now when I open this file on eclipse Juno (forgot to mention that I use the latest Android sdk tools) there are no such buttons at the bottom and I simply can't move to another aspect/view. I don't know if it is a version specific problem with Juno, but since I find it kinda annoying and I prefer mostly to work on Juno.
I tried to search arround the net a bit and couldn't find anything, also I could't find an option in Eclipse that could (perhaps) disable/enable such a feature. Also, i 'd like to mention that my OS is ubuntu 12.04 lts 32 bit.
Any feedback is appreciated!

Try open these with right click on an xml file, then use Open With -> Android XML Common Editor.

Related

Android Studio : Missing attribute definition for orientation

I am new to developing in Android Studio, I started in Windows 10 but since Win 10 gave me some general issues, I installed Ubuntu 16.04 LTS and installed Android Studio.
Its been quite a difficult one to install Java and Android SDK again and while after all is setup, I started with one tutorial from Google for using Constraint Layout. It was all working fine but suddenly after a reboot of my machine, now I am facing strange issues.
The properties window of any component (imageview or textview) will never load and it shows 'loading' with a forever-rotating-circle.
in even log, I find this,
Image of the properties loading
IllegalArgumentException: Missing attribute definition for orientation
I thought there could be issues with Android repository not installed properly. So, I used
android sdk list -a
and installed the Android repository again. Even after multiple restart of the android studio, i still get the error.
Can someone help?
Edit: Support libraries are indeed added. Support Library in dependency in project structure
Make sure you set the orientation for your LinearLayouts and most of all make sure you are not making any spelling mistakes in your arguments for example in your LinearLayout make sure to have android:orientation="vertical" and double check for spelling mistakes like writing android:orientation="verticall"with two "l" can sometines cause these sorts of errors.

Android Hello World in IntelliJ 12 - Cannot find android.app.Activity class

Please see below. I have a feeling I've got the SDKs configured incorrectly, but I'm not sure how to solve it. I tried Googling for answers but no one had this exact problem.
Do I have the wrong Java version maybe? It seems like the two SDKs might be conflicting with each other.
I made this project via:
Create New Project
Android > Application Module
Defaults and Finish
Edit: See screenshot. I got it working. All I did was create a new project and re-select the Android SDK. I'm still thinking it was because I added too many SDKs/JDKs the first time. I think all you need is the Android SDK and don't need to add the normal Java one too.
I tried what for3st suggested to no avail at first, but i've heard other places that you should use JDK 1.6 for IntelliJ IDEA in other places, so you can do that here. Also, you set the SDK by going 'File'->"Project Structure" -> "Platform SettingS" -> "SDKs"
In the end, I also switched from Android 2.2 to 2.3.3 (api 10) and that got it to work. Don't have a good idea why it didn't work for 2.2, but since I just want a beginner's tutorial, I'm fine with that.
I had exactly the same problem, but the conditions leading up to it are quite unusual.
I downloaded the Android SDK as a zipfile and unextracted it into /opt.
However, the permissions did not allow normal users to enter all directories or execute all files... so when IntelliJ indexed the SDK it only picked up the res jar... and never added the sources to the library path!
Deleting the SDK, fixing the permissions problem in the SDK, and creating a new reference in IntelliJ fixed it.

Android:fail Ecclipse when I click on layout tab

When I create an android project in Eclipse (Helios) and open for example main.xml and click on layout view - program closes. If I start eclipse over again and try click in project view on main.xml it happens again.
In the official installation instructions for Android, they tell you not to use Eclipse 3.6 (Helios). Not that many people notice, three lines above that, they still tell you to use "Eclipse 3.4 and above", plus the link they still have there (http://www.eclipse.org/downloads/) points to the latest Eclipse, which is currently 3.6!
The real link is http://www.eclipse.org/downloads/packages/release/galileo/sr2
I urge you to do things correctly and reinstall Eclipse. You may have other problems if you keep 3.6. For instance, on some (but not all) computers, Eclipse 3.6 (Helios) may hang (or gets really slow) when doing auto-complete (it's looking for a non-existent folder).
Also, you won't be able to find Eclipse 3.5 Classic as the documentation still says, Eclipse Classic Galileo is no longer available on Eclipse.org, instead you should install Eclipse Galileo RCP 32-bit (Galileo doesn't have a good 64-bit version).
Just be sure to do a check for all updates, then install the ADT update site, restart eclipse, close all perspectives, reopen the Java perspective, and go to Windows > Preferences and click on 'android' on the left and make sure it found the old location of your android sdks.
Turned out that I had 2 virtual machine- 1.5 and 1.6, in Java Settings tab of project settings I set the path to the new version and UI view has become operational.
Try to right click on the main.xml document in the project navigator and select open with a different method. Can you get Eclipse to open it any of the other built-in ditors?

Android SDK plug-in appears to impact Eclipse heavily

Am I the only Eclipse developer whose workbench quickly sputters, wheezes, crashes or hangs and makes me use Windows 7 Task Manager to hard-bounce it?
I've got dedicated, Android-only (as it were) installations of Eclipse Helios (3.6) and Galileo (3.5) with the very latest Android SDK (0.9.7.v201005071157-36220) using android-sdk_r06-windows.zip. I'm running Windows 7 Professional 64-bit, but 32-bit Eclipse (Helios and Galileo) and a 32-bit jdk1.6.0_20.
It is true that these are both Eclipse Java EE installations and not the bare-bones Java-only (non-WTP) versions. I haven't tried that yet. I followed a tutorial that said to use Helios, but said nothing about what not to include (like WTP which I ordinarily use in my work).
I can avoid much of the trouble by editing XML files using the standard Eclipse XML Editor and avoiding the Android SDK's various XML editors, but very quickly, things stop working and the whole thing caves in on itself.
I've tried bumping memory in eclipse.ini, -Xms128m, but that hasn't helped.
I'm looking to hear from someone who's gotten over this mess or who knows what I should have done.
Any ideas?
Thanks in advance for any and all comments.
Russ Bateman
After a week of frustration I reached the conclusion that you cannot install Android for use in Eclipse Java EE, my usual mode. Instead, use the plain Java Eclipse. My definitive installation became Eclipse Galileo SR2 IDE for Java Developers. I added these lines to eclipse.ini, though I probably did not have to be so generous:
-vmargs
-Xms256m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=512m
In order to distinguish this version of Eclipse from my usual Java EE development version on my task bar, I found an icon to graft onto it at http://www.large-icons.com/stock-icons/free-large-android-icons.htm and selected one that looked most like the green Android icon.
Add this line -XX:MaxPermSize=256m to your eclipse.ini file right after -vmargs. I have no idea why, but apparently it's a known bug. I can get you the source where I found this solution if you'd like, it took me a fair bit of googling

Eclipse crashes when I invoke Android Layout Editor

I'm new to Android & Eclipse. I've downloaded Eclipse and the Android ADT and created an ultra-simple Hello World app (has only auto-generated .java and .xml files).
Eclipse CRASHES (closes after a very brief pause) when I do the following:
In Package Explorer, select AppName/res/layout/main.xml
Press , or double-click, or 'Open With' then 'Android Layout Editor'
(The app runs OK in the Android emulator)
My configuration is:
Android Development Tools 0.9.5.v200911191123-20404 com.android.ide.eclipse.adt.feature.group
Eclipse IDE for Java Developers 1.2.2.20100216-1730 epp.package.java
Windows XP
Can someone tell me what I'm doing wrong or what's wrong with my configuration?
Any suggestions on what to check? For any non-trivial app development I need to
be able to use the Layout Editor.
More ... I can select main.xml and Right-Click and 'Open With' any of: XML Editor,
XML Schema Editor, Text Editor -- with no problem. The problem is limited to Android Layout Editor.
THANKS!
I found the problem.
I discovered the .log files (under \Android SDK\eclipse-java-galileo ...\eclipse )
These files are apparently created by Eclipse when a fatal exception occurs. Upon examining the latest file I saw
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d2521e1, pid=9156, tid=13952
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_02-b09 mixed mode)
# Problematic frame:
# C [fontmanager.dll+0x121e1]
and when I looked further, found the folder where fontmanager.dll resides.
Deducing that 'fontmanager.dll' was part of the Java runtime, I saw that I'd been using jre1.5.0_02, and, upon checking the Sun site, discovered that it's an outdated file. So I downloaded (from Sun site) and installed the latest version of the Java runtime.
That fixed it! The Android Layout Editor runs without problems.
THANKS to Nathan for his efforts. As it turned out, his suggestion didn't solve this particular problem, but the info he provided will no doubt be useful.
You have to upgrade your jdk version to the latest version. I found most of the cases online is that the jdk5 made the eclipse crashed and they worked out by upgrade to jdk6. I used jdk6 but the problem existed! At last I download the latest version(jdk7) and the eclipse not crashes any more!
DONT do anything in eclipse while it says "building project" at the bottom right it does this when you load eclipse, and when you run, or add new files.
If you still have the problem, then I cant help you
In case the above answers don't help, this was my resolve:
I had a similar problem where every time I would view the layout editor (even though I was able to see the XML file) Eclipse would crash. I reinstalled Java, updated Java, and I even reinstalled Eclipse with no avail. It turns out that it was a corrupt video driver, nvd3dum.dll. The filename is in the error list.

Categories

Resources