Android Studio Java Syntax Color Scheme - java

I am using the latest Android Studio version at this time (2.3.3) and I did not have much experience with Android Studio before, when I started to use it now, I feel a bit uncomfortable with the Java syntax.
I do understand that there is a way of changing each attribute colour, if you go to "Editor> Colors & Fonts> Java" I will be able to modify the Scheme myself, but I'm not too sure about how to manage it.
I've been using Eclispe and SublimeText before, and in Sublime it is much easier to understand the code and visually get around.
Android Studio Syntax:
Sublime Text Syntax:
Maybe there is a way around it, where I can import a scheme or a tutorial how to set the correct colours for a correct attributes?
For those that are trying to achieve what I wanted, there is a GitHub repo called sdvoynikov/color-themes where you can download a lot of themes from there and then import into an Android Studio.

Step 1 : Download jetbrains-monokai-sublime theme
Step 2 : Extract the zip.
Step 3 : Go to File -> import settings -> and select the Monokai-Sublime.jar where you previously extracted the zip.
and you are done

Install Java Code Styles, which is compatible with IntelliJ IDEA and Android Studio.

Related

Android Studio - package java.awt.image does not exist

I have a problem running my project on Android Studio. I am working on an Android project that has a native Java library inside it. It was running fine all the time. But suddenly when I open Android Studio, I find this error:
There is also an error in the .gradle of the project:
It says that URI is not registered.
When Android Studio is started, I find this message:
It seems that there is something wrong in Java configuration, but I can't find out what is the problem?
It was running fine all the time
Not on Android, it wasn't.
It seems that there is something wrong in Java configuration
No. You are using classes that are not part of the Android SDK.
The java Swing and AWT API are not part of the Android SDK and thus aren't including with it. You must find an Android equivalent image library to use in your app. There are few good ones around just depends on what functionality you need to have available to you in you app. Try searching Picasso and or Volley. Picasso is very popular and well known. it has a lot of feature including networking functionality for loading images from the web. The Volley library isn't an image library but an networking library that contains some predefined classes for loading images over the internet.
So this just happened to me. I'm not 100% on the details of how I got it working again, but its roughly this (on my Mac):
Quit Android Studio
I went to ~/Library/Application%20Support/ and deleted the AndroidStudio3.2 directory
I relaunched Android Studio and I got some warning dialog about plugins not existing.
Chose the button that is something about reinstalling or fixing (or whatever isn't deleting or ignoring)
Another dialog comes up. There are a bunch of plugins that are in red. Deselect all the red ones. Then reselect all those ones that were previously red.
Android Studio asks you something and if you want to restart Android Studio. Pick the thing that includes restarting.
And once Android Studio restarts, chose to rebuild your project, and then it worked.
Good Luck and I hope this works for you too.

Visual Studio white background theme for IntelliJ IDEA

I hate the Java IDE's and want the feeling of safety that looking at the editor in Visual Studio gives me.
Is there a way I can get a Visual Studio theme, the normal one with the white background, and not the one with the black background, that I can import into IntelliJ IDEA to make it look like Visual Studio's syntax coloring?
Was originally posted as a comment, but it seems to have answered the question so I'll post it here as well for completeness.
I'm not an Intellij-idea user, but it seems like you can get themes here. [Editor's note: there used to be two links, but the website currently redirects to a GH repo in a way that makes the second link untracable. Ask OP for a new link]

How do I set up Netbeans to develop for Android in OS X?

I'm fairly new to the world of coding, but I took a Java class last fall and I really excelled in it, and I'm anxious to keep the ball rollin. We talked a little bit about Android development in class, and I'm certain that if I could just get Netbeans set up properly, I could really do a lot with it. I managed to get Xcode set up to use SDL using the Lazy Foo guides, but I haven't had any luck finding a similar guide for setting up Netbeans for Android development in OS X.
The closest I could find was this:
Setting up your Development Environment
But the directions seemed kind of vague to me, and I ended up getting stuck when I ran the libGDX setup JAR file, and I got this message: "You have no build tools! Update your Android SDK with build tools version: 20.0.0" but I already did download the Android SDK, so I don't know what's wrong!
I have lots of books on Android development, but nothing on actually setting up my chosen IDE! There must be a step by step tutorial on this out there somewhere, right?
Thanks.
Here do the following
1)download the latest version of jdk install it and set up your environmental variables.
2)download android studio and use it.
3)happy coding

Android Studio not Generating Boilerplate Java Classes Like MainActivity

Quick Android Studio question.
Lately I've been creating a lot of new projects in Android Studio and picking the templates like "Blank Activity with Fragment" or "Navigation Drawer Activity" and seeing that it's not generating any Java Classes like it should.
All the /res files get created like normal but there is a lack of any java classes so I have to start from absolute scratch.
While starting from scratch isn't the biggest hassle in the world, I'm curious if I'm just an idiot and have missed a flag somewhere.
here's a shot of the file tree when generating a "Navigation Drawer Activity"
Info on my Android Studio/Project:
-Building with Target SDK 21, minSDK 14, build tools 21.0.1
-Android Studio version is 0.8.13
Thanks For reading, let me know if you need any other information.
I managed to solve the problem. You will need to disable plug-ins that are not the need. In my case, I have used them from GWT

Is there a real Android visual designer for IDEs?

I'm trying to develop an Android application with UI. So it's little complex for me to create UI with codes. I was using Visual Studio for long time where visual design is piece of cake. I also used Netbeans and Eclipse for java applications with UI but when it comes to Android I can't find a good way for UI desing. There is a visual design part in Eclipse but I want to use Netbeans as long as it's possible. Also I think DroidDraw is not good enaugh too. So I seached on web for Netbean's visual design tool and found nothing. If there is no tool or plug-in like this WHY? Thank you for any help.
Edit:
Well, long time passed. I just get used to code my ui. Also I am using Android Studio. 8)
edit
just saw that you've used DroidDraw.
There is official GUI designer included in ADT. Browse for main.xml (project/res/layout/main.xml) and doubleclick it :)
enjoy!
The combination of ADT (Android Development Kit) and eclipse 3.1 + will help you to develop the application graphically. Once you open the layout xml files, click “Graphical Layout” tab at the bottom of the section to open the graphical view. Now you can drag and drop components & also update layout.
But it is better to understand how the xml is defined in the layout. This will help you to fix any problems (in case).
Hope this helps.
Using Embarcadero RAD Studio XE7 (delphi or c++builder) allows for that task but it builds apk files with ome 10mo,

Categories