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