Android studio shows 'cannot resolve method/symbol' - android

Almost everywhere it shows 'cannot resolve method/symbol' and compilation problems.
I'm new to Android Studio. Can anyone help me set it up?
Image with link:

I think it's gradle's fault. Go and click build from the top options, then select clean project.
Since I cannot see the rest of the code, I assume this is the problem.

Related

How to resume a stuck code analysis in Android Studio?

I recently noticed a behaviour, that the default code analysis does not finish anymore in one of my android projects, in particular in kotlin files - unfortunately without an error message. With a stuck analysis I am not able to identify errors in my code anymore and basic stuff like autocompletion does not work, which makes it unable to work.
In the top right corner of the opened file I constantly get Analyzing...
I already tried restarting Android Studio, invalidating its cache, deleting and cloning my project again, rebooting and deleting all kind of gradle and Android Studio cache files but without success.
I finally got it working again with the help of the idea.log file, which can be found via Help > Show Log in Explorer in Android Studio.
The log stated an Exception while analyzing expression at different locations in my files, caused by java.lang.IllegalStateException: #NotNull method org/jetbrains/kotlin/builtins/KotlinBuiltIns.getBuiltInClassByFqName must not return null.
Since it looked like a Kotlin related issue, I upgraded org.jetbrains.kotlin:kotlin-stdlib-jdk7 in my build.gradle from 1.4.10 to 1.5.10 and it worked instantly again. I hope the info helps anyone!
Please remove butterknife plugin in Settings-> Plugin. It is worked for me in java files.

Android Room tutorial does not build

UPDATE: Solved! (see fix at the bottom)
I'm trying to go through the Android Room tutorial but get stuck on step3. I keep getting an error when trying to update the gradle file as specified by the tutorial.
https://codelabs.developers.google.com/codelabs/android-room-with-a-view/index.html?index=..%2F..index#1
When trying to build, I get the following error:
Setting roomVersion to "2.1.0-alpha06" or just "2.1.0" generates the same type of error.
Is it only me or is there something wrong with this tutorial?
Anyone with an idea why the androidx.room:room-testing dependancy fails to build?
UPDATE:
I solved the issue by uninstalling Android Studio and re-installing it. I also needed to do a full cleanup and remove all "android studio" and "gradle" related files on my system. Maybe a bit overkill, but this is whats fixed it for me.

How to disable Androidstudio “offline” mode?

My Android Studio version is 2.3. I imported a project from github but it won't build. The error displayed is:
There's an error displayed, so this must be a common problem. Then I handle as shown:
But it still doesn't work. It rebuilds in one second and still shows that problem. And the setting switches back to "offline".
The project which I import is this: github.com/452MJ/C9MJ
So how should I solve this?
*My native language is not English, so thanks for your patience.

OpenCV with Android Studio Problems

I know this has been discussed before, but I have had frustrating 3 days and I still can't get it to work. I am following this
After I finish 'Adding OpenCV to your new project', I get the error:
'Gradle 'opencvtest' project refresh failed' with a blank after Error
I tried everything, but even the simplest things don't work anymore. Can anyone help me?
Check out this repository: https://github.com/gowithfloat/android-opencv-template just download and should work.

Showing Error !!! Android

When i try to compile and build the application, a red mark is appearing on my application,but there is no error description ..
what will be the reason?
There is always a reason, just need to find it :) Try refreshing and/or cleaning your project. To find error description (in Eclipse) open Problems perspective.
Is probably a weird eclipse/android sdk error. Run Project Cleanup and it should go away.

Categories

Resources