org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException Android Studio - android-studio

Code analysis failed with exception: org.jetbrains.kotlin.idea.caches.resolve.KotlinIdeaResolutionException: Kotlin resolution encountered a problem while analyzing KtNameReferenceExpression
I am using Android Studio Version 4.2.1 and my current Kotlin Version is 202-1.5.10-release-894-AS8194.7 in this I am facing this issue and it does not getting resolved. I have tried many methods but did not find any solution of this issue.
Error Issue

I have the same problem. In my situation, this happened due to the change of dependency versions to earlier ones. From these:
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
to these:
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.core:core-ktx:1.0.2'

Related

"Cannot access android.arch.lifecycle.ViewModelStoreOwner" in android studio 3.2

I have recently upgraded my android studio to version 3.2, and since everywhere I try to access fragment/activity attributes from my ViewModel classes, I get this "Cannot access android.arch.lifecycle.ViewModelStoreOwner" message:
It does not affect compilation, but this annoying message pops in a lot of class.
Any ideas?
PS: I have already tried "Invalidate caches and restart" several times
Just got the same problem after update, this helped:
Add this line to your module’s build.gradle script:
dependencies {
...
implementation 'android.arch.lifecycle:extensions:1.1.1'
}
Found it here: Adding Components to your Project
I have faced the same issue and I resolved this issue by updating android support libraries in build.gradle file.
I would recommend updating your android support libraries to 27.1.1 or newer. No need to add this :
implementation 'android.arch.lifecycle:extensions:1.1.1'

Lint errors after migration to AndroidX:

After migration/refactor to AndroidX (using the migration tool in Android Studio 3.2 RC2), I get a huge set of the following type of Lint errors:
participant_menu.xml:9: Error: Should use android:showAsAction when not using the appcompat library [AppCompatResource]
app:showAsAction="never" />
I'm confused; I guess this is an error in Lint related to the migration to AndroidX. Am I correct, or should I switch back to the android namespace?
Note: my minSDK is set to API 16.
Should use android:showAsAction when not using the appcompat library
[AppCompatResource]
app:showAsAction="never"
If you are not using Appcompat library, I believe you should use:
android:showAsAction="never"
(As documentation says)
Also, it seems like there are still some issues in Androidx which needs a documentation or a direct guide for that since I've seen some people had problems with this or with the SearchView or etc.

libGDX, project build fail. Could not detemine java version '9.0.1'

I am new to libGDX, just planning to create a new project. but the generation of project fail with this error displayed
"Could not detemine java version '9.0.1'.
I have linked the SDK path like how I linked it in android studio. need help. I found it might be something to do with the gradle version. do you guys know how to let libGDX uses the latest gradle?
Check this issue, already in libgdx issue tracker.
According to this discussion, Gradle update may solve this issue so wait for this issue to be resolved.

Upgrading to com.android.tools.build:gradle 2.0 causes JavaLaunchHelper conflict during compilation

When I upgraded my project Android Studio 2.0 (which triggered me to upgrade com.android.tools.build:gradle:1.50 to com.android.tools.build:gradle:2.0), I get the following error:
Error:objc[17636]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
The error seems to be benign and I tried some of the suggestions at https://code.google.com/p/android/issues/detail?id=204797 and it did not seem to help.
I've also seen numerous reports of this being a JDK issue here (which has not fixed yet), but it's odd that this only happens after I upgraded the gradle version.
Invalidating Cache and restarting android studio worked for me. I was on AS canary 3.0 and my Gradle upgrade was from 3.3 to 3.5
update: This is only a temporary fix, the problem seems to come back after some runs

How to solve: Error MT2002: Can not resolve reference: System.Void MonoTouch.Foundation.NSTimer::.ctor() (MT2002)

When using Steema TeeChart for MonoTouch (5.4.0) and compile to run on a physical device, I get Error MT2002: Can not resolve reference: System.Void MonoTouch.Foundation.NSTimer::.ctor() (MT2002).
I already know the answer but put the question here as a reference for others.
The problem is that Steema TeeChart uses a bad version of NSTimer, that Xamarin removed in the latest version of MonoTouch.
There is a discussion about the issue here:
http://monotouch.2284126.n4.nabble.com/error-MT2002-Can-not-resolve-reference-when-building-for-iPhone-td4656884.html
And a hotfix for it here:
https://bugzilla.xamarin.com/show_bug.cgi?id=6987
From MonoTouch 5.4.1, the hotfix will be built in and hotfix installing won't be necessary.

Resources