Why android source file is all red in Android Studio - android-studio

I made a basic application in Android Studio from guide
It works fine in emulator
But when I try to go to some sources, android.content.Context in particular it looks all red - half of imports are red 'Cannot find declaration to go' screenshot
Why is it so and how can I fix it making it black and look into android.annotation.AttrRes for example?

your Mapper 4.x is not supported in android studio that's y the modules are unable to import, I believe there is a setup problem, you should follow the steps from the below link
https://developers.google.com/maps/documentation/android-api/utility/setup
once done with setup make sure you are using the latest dependency of google maps
"compile 'com.google.android.gms:play-services-maps:10.0.1'"

Related

Flutter UI Guides not showing in Android Studio

In Android Studio V4.1.3 (build no. Al-201.8743.12.41.7199119) The Flutter UI guides for widgets and methods not showing at all even though it is enabled in the settings. Please, be kind to see the screenshot =>
no Flutter UI guides
I have Flutter Plugin V55.1.1 and Dart Plugin V201.9335 installed.
All your help is highly appreciated.
Thank you
You might be creating the new Flutter project and selecting Java for Android. But when you select Kotlin and create project. The issue will be fixed.
And if you want your old projects to be converted to Kotlin, just open the terminal in that project and run this
run flutter create -a kotlin .
The dot(.) at the end is also important it will generate the Kotlin files in current directory.
After this, just re-open the project, you'll get the guides.
I have the same android studio version as you and Flutter Plugin V55.1.1 and Dart Plugin V201.9380 installed. Getting the same issue. I have even tried to enable and disable the "Show UI guidelines for build methods" in Setting > Language & Frameworks > Flutter, but nothings work.
I cloned flutter/sample from GitHub and it seem that the UI guides is showing on that samples project.
My current (kinda easy cheat) solution right now is by creating a New Flutter application project via VS Code. And when I open that flutter project on Android studio, the UI guides is there. I have configure my VS Code with the recommended setting for Dart code.
Tutorial to configure your VS Code reference: https://youtu.be/nAmOt5_fMtU?t=278
I'm pretty new in flutter development but I'm pretty sure there might be something that we can configure on Android Studio seeing that generated project file from VS Code does shows the UI guideline. If someone know how do let me know. Cheers!

How to user sketch app sources templates on android studio?

I'm looking for a way to use sketchappsources.com templates on android studio, I found out that the sketch official application is working only on MAC OS and there is an alternative called Lunacy (by Icon8) that works on windows, the problem is that even after importing the downloaded theme on lunacy I have no idea how am I supposed to get the xml/drawables that I can import into android studio, any one can help please?
Thank you
You can simply use some plugins which are created exactly for this purpose.
For example Sympli would let you to drag and drop your design into Swift or Android Studio in no time.
There is also some basic tutorial on their website for getting on board.

android studio android.support.v4 not found

I have been looking for this for last 4/5 hours, but couldn't solve the mystery. I am trying to migrate my project from Eclipse to Android Studio but have this error. What I have tried after googling is:
1) Add compile 'com.android.support:support-v4:22.1.1' in dependencies of build.gradle file
2) Close and import again (several times).
Can anybody please show some light before I decide to go back to Eclipse again?
Make sure all support repositories and libraries are updated in Android SDK Manager.

How to add library in Android Studio?

I am trying to add a 3rd party library to my project.
But it keeps on giving this error:
Error:(10, 0) Could not find property 'VERSION_NAME' on project ':library'.
I am adding Floating action button library
Can someone mention me the proper steps how do I import it?
as mentioned in here in the link you provided. You just simply paste this into your Build.gradle file
compile 'com.getbase:floatingactionbutton:1.9.0'
If you want to learn more about android studio, check out this tutorial I made on getting started with android studio :D

Compiling the sample GDK applications

I followed the directions (OSX, Eclipse Juno) and created the new android sample project.
Project got created, but the R wasn't generated and I wasn't able to build and run the application due to errors in the code. I tried to clean and build but no success. Every other aspect of the instructions worked well. DDMS perspective detected the glass device and the build target is Glass Development Kit Sneak Peek.
I also tried to open the project in Android Studio 0.3.6 but no luck.
Any help generating the R would be greatly appreciated.
No idea whether this will work well, but worked for me.
Delete all the Glassware projects with errors. Close Eclipse and restart it. Now create a new project with a "new name" which is not similar to the previous projects. While creating, make sure the Minimum and Target SDK are android 4.0.3. "Compile with" should be "Glass Development Kit". Now insert you code, import any missing packages and save it.
I did the same and it worked.
I did the same steps on my Windows work computer, and the R generated just fine.
So, guessing this is a Mac+Eclipse issue.

Resources