Android :: ClassCastException From Layout Editor In Eclipse's ADT Plugin
Aug 8, 2010
This is probably related to this question. I want to know if anyone else gets the same error as me and if there is a way to get around this. I did the following: Followed the instructions from this page. From the top, go to File -> Create a new project -> Android Project -> Create project from existing sample. Checked Android 2.2. From the drop-down menu picked SkeletonApp. Clicked finish. From the package explorer, went to SkeletonActivity -> res -> layout -> skeleton_activity.xml. In the tabs at the bottom of the editor area (editor area is the center of the screen) clicked on Layout. Then I got the error "ClassCastException: android.widget.EditText cannot be cast to andoid.text.ViewGroup". The full text of the error message is given below.
java.lang.ClassCastException: android.widget.EditText cannot be cast to android.view.ViewGroup
at android.view.LayoutInflater.rInflate(LayoutInflater.java:619)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
at android.view.LayoutInflater.inflate(LayoutInflater.java:296)
at com.android.layoutlib.bridge.Bridge.computeLayout(Bridge.java:397)......................
View 1 Replies
Sep 26, 2010
I thought ADT should come with a visual editor for building GUI : http://stackoverflow.com/questions/851882/easy-way-to-build-android-ui However, I just cannot find it. I was wondering where is the Visual Editor for Eclipse with the ADT plugin. I can run HelloWorld application without problem. However, whenever I click on main.xml at the left navigation tree layout folder, here is what I get. What I wish to get is a WYSIWYG editor.
View 4 Replies
View Related
Jan 16, 2010
I am new to java, eclipse, and android development, so I may be missing something simple although I have checked basic stuff like spelling several times.
Because there is no number picker control (such as that used in the date picker) in the public Android SDK, the conventional wisdom is to "clone and own" the control that exists in the Android source.
In an attempt to do that, I have copied the code for NumberPicker into my project and its dependency, NumberPickerButton. I have also copied the supporting resources.
The problem I am having is that when I try to include the NumberPicker in a layout, the rendered version of the layout within Eclipse does not work.
CODE:...............
Adding that tag causes the Layout view of the XML file to only show the following error.
ClassCastException: com.spencerandbrown.PatientTracker1.NumberPickerButton cannot be cast to com.spencerandbrown.PatientTracker1.NumberPickerButton
I have tried both the fully qualified name and the unqualified name and it makes no difference.
The strange thing is that the control works at run time, it just will not render in Eclipse.
Is there a solution for this issue? Am I just doing something wrong?
If necessary, I can include more code from my project to clarify.
If I reference the internal Android widget, it works fine in the Eclipse layout view, but it is clumsy to interact with that way and it might break in the future.
CODE:............
Here is the stack trace from Eclipse.
CODE:........................
View 2 Replies
View Related
Mar 3, 2010
Looking at the search results on the internet and on this group,I find several mentions of the problem. Eclipse crashes while opening layout in the editor.
View 2 Replies
View Related
Oct 29, 2009
Relative noob working with Eclipse and Android.I just switched from Windows XP to Mac (Snow Leopard) and I'm having a little trouble getting Eclipse up and running the way I like it.I installed the Android Mac SDK, but my layout editor isn't showing me a preview of the activity layout, it's just showing me the XML tree, even when I'm on the design tab.Is there something I need to do to enable the layout editor in eclipse?
View 3 Replies
View Related
Feb 27, 2009
System config is MacOSX with default JDK 1.5.0_16. Eclipse 3.4 The problem is I have a project in workspace that has been developed under JDK 1.6.I don't really want to switch back to 1.5 ( i' would have to clean up a LOT of @Override ) but if i work with this project, after couple of rebuilds - eclipse layout editor not able to display preview. Work around i found so far open android project that is in compliance with Java 1.5. Close everything else and rebuild workspace. But it's kind of annoying to do it every time.
View 2 Replies
View Related
May 28, 2009
I'm porting an app of mine to work better with API 1.5, and I'm having problems with the layout files where I'm using an AutoCompleteTextView (and, naturally, MultiAutoCompleteTextView). Whenever I have them present in a layout, the graphical representation of the layout disappears, and "NullPointerException: null" replaces it. Is there any way I can view a widget such as this in the Eclipse editor? It definitely worked in the 1.1 SDK, otherwise I wouldn't have used them.
View 2 Replies
View Related
Feb 27, 2010
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.
View 3 Replies
View Related
May 11, 2010
Has anyone figured out how to scroll the contents of the Layout Editor when those contents overflow one "screen"? I'm talking about at design-time while using the ADT Layout Editor, not scrolling at run-time on a physical device (that works fine).
View 2 Replies
View Related
Mar 30, 2009
In the layout editor in Eclipse, I have created a custom view. For some reason, there are a few methods which cause NoSuchMethodError exceptions in the code. Here is the code in the initializer of the custom view:.............
View 2 Replies
View Related
Dec 19, 2012
Why there is difference between the screen layout in eclipse in xml editor and in the emulator?
View 1 Replies
View Related
May 12, 2009
I'd also like a way to change the default, if possible.
View 1 Replies
View Related
May 5, 2010
Since yesterday everytime I open my layout Editor in Eclipse for the Android UI the last part goes on and on as expected if an Stackoverflow Exception occurs.Anybody else experiencing this and found a solution?I'm working with the latests android sdk on Mac OS X with Eclipse 3.5.2.I just installed the Carbon Version of eclipse and I get this error even in this fresh copy of eclipse.Very strange that I'm the only one experiencing this error. Maybe it is not an Eclipse problem but an problem of my project setup.
View 2 Replies
View Related
Jun 25, 2010
I'm searching for a better Android XML layout editor than the one in eclipse. Preferable placing items by drag and drop to the correct X/Y position. With the current editor I have to try out figures to place it at the exact position is there an easier way?
View 2 Replies
View Related
Jun 18, 2009
I have a mac and I run JDK 1.6 with my android dev setup and eclipse 3.4. It seems that the layout editor display is totally fragged.
View 2 Replies
View Related
Apr 13, 2009
Is there an explanation of the ADT layout editor UI some place? I can't find anything on the Android web site about it. When I look at a layout in the design view, there are a number of fields at the top with labels like MCC, MNC, Lang, etc. I've noticed that I can change the contents of these fields, such as orientation, and it has an effect on the view. But a yellow warning triangle appears next to the field I've changed and the next time I open this view I see the unmodified field. For example, if I change to landscape orientation the view goes back to default next time. Is there documentation some place on what these fields mean and how they are supposed to be used?
View 4 Replies
View Related
Feb 27, 2010
I'm trying to extend a RelativeLayout object and include an embedded SurfaceView object that uses a png file in my /res/drawable folder as its background but I keep getting an error in the XML Layout editor. See the following code:
public class StopMotionRelativeLayout extends RelativeLayout
{
private Context myContext;
private SurfaceView surfaceView1;
private BitmapFactory.Options myBitmapOptions;
private final android.view.ViewGroup.LayoutParams params =
new LayoutParams(LayoutParams.FILL_PARENT, android.view.ViewGroup.LayoutParams.FILL_PARENT);
public StopMotionRelativeLayout(Context context, AttributeSet attrs) {
super(context, attrs);
myContext = context;
this.setBackgroundColor(Color.GREEN);...................
View 1 Replies
View Related
Jan 30, 2009
I can't seem to get anything back from https://dl-ssl.google.com/android/eclipse/ - even accessing from a browser just gives a 404.
View 6 Replies
View Related
Jul 17, 2010
Is there a (simple) way to completely and utterly disable all Java formatting in the Eclipse editor?
That is an Eclipse question, but I appreciate your indulgence because this problem is slowly driving me insane. I am spending a lot of time fixing code to make it look good again after it gets mangled by the automatic formatting. I thought I had removed all formatting keyboard shortcuts, but I missed something because my code keeps getting changed. I suspect the culprit to be the SourceFormat menu option because that can be triggered by Alt-S-F which is very close to Alt-F- S, the File/Save command.
So a little finger slip and code mangled. Unfortunately, the mangling is not always done where I am looking (since it is applied to the entire file), so I don't always know to undo it. Is it possible to disable or remove a menu item?
View 8 Replies
View Related
Jun 3, 2009
I'm trying to develop plugin for eclipse that should draw my custom view inflated from XML. Everything works fine until eclipse tries to instantiate any class from android.jar library. It fails with Runtime exception without any other helpful information (stub!).
View 2 Replies
View Related
Jan 31, 2010
I am using a laptop with Windows 7 Home Prem x64. I have installed Java JDK1.6.0_18 and Eclipse Gallileo. I have downloaded and installed the latest version of Android SDK with several Platforms loaded and a AVD defined. I can install the Android Eclipse plugin from the remote site stated in the instructions. The plugin installation performs without any errors and I can verify that the plugins are indeed installed. My problem begins when I go to Windows -> Preferences, there is no Android section to configure. And when I go to File -> New -> Project, there is no Android Project to choose. I have uninstalled the plugin and reinstalled at least 10 times, trying different things and still no luck. I originally had the 64 bit version of the JDK installed, but removed it and installed the 32 bit version. Is it because I am using Windows 7?
View 3 Replies
View Related
Nov 8, 2009
I installed ADT plugin to Eclipse 3.5. But at Window -> Preferences Android node is not shown.
View 6 Replies
View Related
Apr 28, 2009
I've updated from 1.1 to 1.5 following
http://developer.android.com/sdk/1.5_r1/upgrading.html
0.9 ADT plugin was successfully installed. The Android plugin doesn't present in Window -> Preferences options. So I can't perform step "Update your Eclipse SDK Preferences". Using fully updated Eclipse Ganymede 3.4.2
View 7 Replies
View Related
Feb 21, 2010
I m developing an android app, i ve had a problem with the layout editor. I m using eclipse 3.5.1 for RCP/plugin developers, the android developers kit version 0.9.5 and jdk 1.6 in ubuntu 8.04 hardy heron. I ve been working good until one day i had to modificate my UI. when i tried to see my main.xml layout i found the following error: Null Pointer Exception then NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit. I was looking for a solution but i didn't find so i reintalled all. Eclipse, ADT, SDK and Java. First it (layout) looked to work again but in two days it broke again. I m so frustrated cause i dont know what i do to get this error. First it works then don t .why?
View 3 Replies
View Related
Aug 17, 2010
My eclipse galileo was working fine till morning; when i checked for updates for it and also updated the ADT then it asked to restart eclipse. Now i cant see any kind of Android options/menu in eclipse. But i can see ADT in installed software. Even if i open my old projects in the workspace, eclipse is unable to recognize any of the Android classes.
View 2 Replies
View Related
Jul 25, 2010
Ive no doubt this question may have been addressed before but how can I turn on a framerate monitor to use when I run my programs using the android emulator so I can see exactly what my android game is achieving at a given time?
View 1 Replies
View Related
Nov 10, 2009
I am trying to install the ADT plugin to eclipse SDK (Version: 3.5.1 Build id: M20090917-0800) but is giving the below error: I have tried the links
"https://dl-ssl.google.com/android/eclipse/" and "http://dl-ssl.google.com/android/eclipse/". Also tried manually downloading the plug-in (ADT-0.9.4.zip) and installing, but all of them give the same error(below).
MESSAGE An error occurred while collecting items to be installed! SUBENTRY 1 org.eclipse.equinox.p2.engine 4 0 2009-11-09 17:14:13.904 !MESSAGE session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Collect, operand=, action=). !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 4 2009-11-09 17:14:13.904 !MESSAGE Result of processing steps. !SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2009-11-09 17:14:13.904 !MESSAGE Unpack facility not configured !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 4 2009-11-09 17:14:13.904 !MESSAGE Result of processing steps. !SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2009-11-09 17:14:13.904 !MESSAGE Unpack facility not configured !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 4 2009-11-09 17:14:13.904 !MESSAGE Result of processing steps. !SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2009-11-09 17:14:13.904 !MESSAGE Unpack facility not configured !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 1 org.eclipse.equinox.p2.artifact.repository 4 4 2009-11-09 17:14:13.904 !MESSAGE Result of processing steps. !SUBENTRY 2 org.eclipse.equinox.p2.artifact.repository 4 0 2009-11-09 17:14:13.904 !MESSAGE Unpack facility not configured !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904 !MESSAGE OK !SUBENTRY 2 org.eclipse.core.runtime 0 0 2009-11-09 17:14:13.904
View 2 Replies
View Related
Apr 28, 2009
Can someone confirm or let me know if it's a problem with my setup where the 0.9 eclipse plugin will complain about not finding the SDK even if the workspace has no Android projects in it? I work on a few projects and many of them don't have Android apps involved, so it's a little annoying to get the popup on every single workspace.
View 7 Replies
View Related
Feb 25, 2009
I'm not sure what's going on, but I tried to post this before, and it didn't show up. If this is somehow a duplicate, I apologize.
Has the ADT repository been deleted or moved? I've tried entering the URL in Eclipse and it can't find it, and I tried just browsing to the page, and I get a 404 from google. I've tried both https and http with no success. Any help would be greatly appreciated! What should have been a 1 hour (max) activity (setting up Eclipse and the Android SDK on a new machine) is now dominating my day.
View 2 Replies
View Related
Mar 17, 2010
I've been trying to make a new Android project in Eclipse. But whenever I try to do so, it won't let me select a build target. Here's a screenshot: http://twitpic.com/198od6
View 3 Replies
View Related