Tag: android-studio

Setting Android Toolbar Background and Text Colors in Android Studio 1.4.1

I’m trying to change activity action bar’s background color and title color, i tried official tutorial and some answers from here but none worked for me , i’m missing something. styles.xml <!– Base application theme. –> <style name=”AppTheme” parent=”Theme.AppCompat.Light.DarkActionBar”> <!– Customize your theme here. –> <item name=”colorPrimary”>@color/colorPrimary</item> <item name=”colorPrimaryDark”>@color/colorPrimaryDark</item> <item name=”colorAccent”>@color/colorAccent</item> </style> <style name=”AppTheme.NoActionBar”> <item […]

Android studio suddenly cannot resolve symbol R

I was having a project open in Android studio. It was generated by the wizard and working fine. I did some small changes to activity_main.xml and when I changed back to MainActivity.java i get the error in several places that it cannot resolve R. I might have done something to cause this. But I´m not […]

Android Studio fail add libs Universal Image Loader

Android-Universal-Image-Loader(https://github.com/nostra13/Android-Universal-Image-Loader) is my favorite library. But it can’t add libs when i use Android Studio(use 0.1.5 version). i know how to add libs in Android Studio (https://stackoverflow.com/a/16628496/397457) when i add Android-Universal-Image-Loader libs to Android Studio. Editor error about “can’t reslove R”. i try this Max OSX(i try too Windows but fail. Windows error message => […]

Android Studio: suppress lint warning for if statement

I have a this code somewhere in my Android project: public boolean isLoadInProgress(boolean privateLoad, boolean publicLoad) { if (privateLoad && privateLoadInProgress) { return true; } if (publicLoad && publicLoadInProgress) { return true; } return false; } I get a lint warning at the second if statement: ‘if’ statement could be simplified. That’s obviously because I […]

Android studio “Your app does not have the latest code changes..”

I tried to run app from Android studio, and it worked. But after stopping and starting few times this message appears. Uninstalling and installing over again works, but as soon I restart the program the same message reappears. “Your app does not have the latest code changes because it was restarted manually. Please run from […]

How to check what is the latest version of a dependency to use in gradle

I’ve always added dependencies like this: dependencies { compile ‘com.android.support:mediarouter-v7:19.+’ } but in the recent versions of Android Studio, they recommend not to use the + as it can lead to errors. How to know what’s the latest version? I can try every combination of 19.y.x until gradle complains, but what’s the real way do […]

Will you recommend beginners to use Android Studio?

I am a beginner in android development. Google announced android studio. Will you recommend me to use it or sticking to eclipse makes sense for now.

Can't import import android.hardware.camera2 classes

I imported the opencv android library to my android studio and the Camera2Renderer class has a lot of compiler errors because the android.hardware.camera2 classes can’t be imported.

Cannot launch AVD in emulator Android Studio

Problem with emulator in android studio 2… Cannot launch AVD in emulator Output: libGL error: failed to load driver: nouveau libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast X Error of failed request: GLXBadContext Major opcode of failed request: 155 (GLX) Minor opcode of failed request: 6 (X_GLXIsDirect) Serial […]

Android logcat error: “E/CliptrayUtils: hideClipTrayIfNeeded() TextView is focused!! hideClipTray()”

I am new und unexperienced to Android, trying to develop apps in Ubuntu 14.04 with Android Studio 1.4. I use two activities, and none of these activities, layout or the like uses a ‘ClipTray’. However, in logcat I see the following entry: E/CliptrayUtils: hideClipTrayIfNeeded() TextView is focused!! hideClipTray() and google does not really help here […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.