Eclipse crashes when I invoke Android Layout Editor - android

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.

Related

Setting up OpenFrameworks with Android Studio

I'm in the process of setting up my system to deploy OpenFrameworks apps on Android devices.
I've followed the instructions here to the letter: http://openframeworks.cc/setup/android-studio/
However, whenever I open one of the OF - Android example projects, I keep getting the following error:
I haven't turned up anything yet as far as what the issue may be (and this is my first foray to Android anything). Anyone have an idea?
It could be because there are some spaces in your directory path in "Development Tools" and "3rd Party Tools". I've had weird issues in the past with openFrameworks and Android studio like the one you're having.
Try to put openFrameworks in a path structure without spaces. Maybe clone a fresh version to test.

eclipse cause Lint error when save any layout xml files

I think I'd tried everything to fix it but failed.
I've downloaded eclipse from here: http://www.eclipse.org/downloads/packages/eclipse-android-developers-includes-incubating-components/neonr
It's the latest eclipse package made to work with android app developing.
AND
I've downloaded and installed Android Sdk from:
https://dl.google.com/android/installer_r24.4.1-windows.exe
https://dl.google.com/android/android-sdk_r24.4.1-macosx.zip
That's right, both windows and mac versions.
My Android sdk looks like this.
And I created a new android application project, and I just open a pre-made layout xml file and as soon as I save a change I got this.
'Running Android Lint' has encountered a problem.
Failed
Detail:
Failed
java.lang.UnsupportedOperationException
So, here is the big question, how to fix android lint? Or at least point me the right direction, I've tried this on a PC and on a Mac, same problem.
Update: I know android studio and I've used it alot. Let's just say I have my reasons to pick up eclipse and make it work again.
It can be solved by turn off lint error check.
Click Window in Eclipse, select Preferences. Select Android -> Lint Error Checking on the left, and uncheck following checkboxes:
1.Run full error check when exporting app and abort if errors are found 2.When saving file check for error
For ref please check the screenshot I have attached:

Android Studio showing unchanged files in commit changes dialog box

I am using Android Studio 2.0 Beta 6 on Ubuntu GNOME. I am facing a strange problem. I am using git version control in my Android project. After building the project, when I click on commit changes through Android Studio GUI. The commit changes dialog box shows every file as changed. When I click on any file, it says contents are identical. I am attaching the screenshot below, clicking on any files says contents are identical.
So my question is, Why Android Studio shows files with identical changes in commit changes dialog and how can I solve it? I tried google but didn't found any related question.
It must be because of automatic file encoding changes by the IDE (In case you imported the project from somewhere else). Sometimes IDEs apply them automatically. Just revert the changes and do a clean and build. If the changes appear again, you will need to do a commit once and after that you'll be allright.
To verify you can just go to a normally behaving file. Open it in notepad and just save as from notepad with another encoding. It should show as modified thereafter in the version control window.
For me it was AS pointing to old git version. Please check the Settings\Version Control\Git
I ran into this issue as well. None of the typical culprits seemed to be at fault. As far as git (from the command line) was concerned, the files were unmodified, yet Android Studio still showed them as modified.
It turns out Android Studio and my command line terminal (cygwin) were using two completely different Git binaries. Android Studio was pointing to a Git installation I had made at some point in the past, while cygwin was pointing to /usr/bin/git, which had come from Cygwin's Git package.
I edited Android Studio's version control settings (as shown in Anton's screenshot) to point to the git.exe within my Cygwin distribution, then did a "refresh file status" from the VCS menu, and all the files went back to showing as unmodified.

Cannot start Android Studio. Android Studio stuck at the splash screen

I am not able to start the android studio. I have set java path in environment variables and Android studio is also latest version. I have tried to install and run administrator but no help.
Please help me...
Open file Android Studio setup directory/bin/idea.properties
Add disable.android.first.run=true to tail
Restart AS.
Going through the Known issues page(https://developer.android.com/studio/known-issues) found me the fix.
You have to set these additional PATHs
ANDROID_HOME = your SDK directory (android-sdk)
PATH=%PATH%;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
Actual Solution
None of the answers here specify on how to debug the problem, you need to run the bin\studio.bat script in the terminal and inspect the actual Idea exceptions in order to fix the problem.
No need to re-install, delete precious configuration (and plugins, etc.). Just read the error message!
For me, this was the issue:
ERROR - llij.ide.plugins.PluginManager - java.net.BindException: Address already in use: bind
java.util.concurrent.CompletionException: java.net.BindException: Address already in use: bind
This means the plugin manager is trying to listen on a port that is not available. Is something listening on that port? For me, it is the stupid "excluded ports" by Windows, so I simply stopped the service:
net stop winnat (as administrator), and confirmed that Android Studio started to work.
Don't delete your configuration files, especially if you don't want to re-configure your settings. Just read the log provided by the bin\studio.bat script.
As of January 2016, the most recent canary needs the property written as as:
-Ddisable.android.first.run=true
otherwise it complains about missing JAVA_HOME. (using windows 10)
Fixed mine android studio by changing the system language, you can set yours to English go to Control Panel->Region under formats tab change the format to English(United states).
I had the same issue, I fixed it by changing the system language. Set your language to English by going to the Control Panel/Region. In the Formats tab change the format to English(United states).
I upgraded my Android Studio from 3.0 to 4.1 and after that AS always stuck on the splash screen. Fortunately, this section of the known-issues works for me https://developer.android.com/studio/known-issues#studio-config-directories
Fixed my Android Studio by changing the system language. You can set yours to English by going to:
Control Panel->Region
Under the formats tab, change the format to:
English(United states)
Thanks #ravi this also worked for me
As of March 2022, I was stuck in the splash screen was due to a plug-in conflict, but the IDE wasn't warning about it.
I received a warning balloon saying that I had the ExcelReader plug-in installed, suggesting me to install the new ExcelEditor plug-in, which is an improved (and paid ¬¬) version (I knew later). So I went and installed it and the IDE suggested restarting.
After restarting, the IDE always got stuck in the splash screen every single time I tried to launch it.
It wasn't until an hour later and so many launch attempts that, miraculously, the IDE launched and a dialog showed up warning about both plug-ins being not compatible so I had to disable one of them. It was a shame that it didn't warn me before. So I chose which one to disable on the dialog and it worked again.
Therefore, I suppose that if this were to happen again, it could be solved by editing the file /home/$USER/.config/Google/AndroidStudio2021.1/disabled_plugins.txt and adding the plug-in to the file manually.
In my case it was "com.chesterccw.excelreader" what I should have added. After that, of course, I uninstalled one of the plug-ins.
Studio doesn't start after upgrade
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin. As a workaround, try deleting (or renaming, for backup purposes) the directory below, depending on the Android Studio version and operating system, and start Android Studio again. This will reset Android Studio to its default state, with all third-party plugins removed.
For Android Studio 4.1 and later:
Windows: %APPDATA%\Google\AndroidStudio<version>
Example: C:\Users\your_user_name\AppData\Roaming\Google\AndroidStudio4.1
macOS: ~/Library/Application Support/Google/AndroidStudio<version>
Example: ~/Library/Application Support/Google/AndroidStudio4.1
Linux: ~/.config/Google/AndroidStudio<version> and ~/.local/share/Google/AndroidStudio<version>
Example: ~/.config/Google/AndroidStudio4.1 and ~/.local/share/Google/AndroidStudio4.1
For Android Studio 4.0 and earlier:
Windows: %HOMEPATH%\.AndroidStudio<version>\config
Example: C:\Users\your_user_name\.AndroidStudio3.6\config
macOS: ~/Library/Preferences/AndroidStudio<version>
Example: ~/Library/Preferences/AndroidStudio3.6
Linux: ~/.AndroidStudio<version>/config
Example: ~/.AndroidStudio3.6/config
Note that the configuration directory for Canary and Beta releases of Android Studio is PreviewX.Y instead of X.Y for the . For example, Android Studio 4.1 Canary builds use AndroidStudioPreview4.1, instead of the AndroidStudio4.1 directory that is used for Release Candidates and Stable releases.
https://developer.android.com/studio/known-issues
just add this line disable.android.first.run=true at the bottom of the idea.properties file in the bin directory of the installation folder

Android NDK - Eclipse can't include jni.h

So I'm using Eclipse 4.2 to build my projects which imports native functions in Java.
Everything build fine with eclipse and yesterday everything worked fine.
Today my eclipse stopped to resolve jni.h headers and others android header and shows me errors.
My project builds correctly but eclipse forbids me running application with message saying that there are errors in my application.
I have all paths to symbols in project paths and symbols c,cpp.
And it was working without errors... My only solution right now is to build project, then restart eclipse and run application...
EDIT: oh... It's funny... Now eclipse doesn't start android emulator when i click run as...
EDIT2: even when I create new project...
EDIT3: Its funny... I had to add in avd device... I don't know how it is possible but for two days I've been using it without device in avd and it was working... (I haven't change api or anything like this and I haven't touch AVD Manager)
EDIT4: Strange things happenes in eclipse... I still don't know why eclipse has problems with includes...
It's a bug in ADT 20. Refer http://code.google.com/p/android/issues/detail?id=33788
Go with Alex' adwise until ADT 21 or a patch for ADT 20 is released.
[edit] BTW: you can always simply delete errors in the Problem list ;-)
You can go to Project|Properties|C/C++ General|Code Analysis then uncheck everything in there. That will provide for running your app until you figure out the proper fix.
You can do this by choosing Properties for the project
Properties -> C/C++ General -> Preprocessor Include..-> Entries -> Setting Entries -> CDT User Setting Entries
Add -> Include Directory -> File System Path, and enter the path of the includes like:
${NDK_ROOT}\platforms\android-5\arch-arm\usr\include
Also I found that this working for me only if I checked "Contains system headers" checkbox.

Categories

Resources