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

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'

Related

How to use HttpClient in android studio app?

unfortunately this question was closed however it is spot on. Let me go through the steps as I am reproducing a legacy app issue that uses httpclient so switching is not an option YET (6 months out maybe).
create android studio app
try to use Httpclient and as he shows in the post above it is in red
I try to add this line in build.gradle to bring it in as a work around(even though core android also brings it in)
implementation 'org.apache.httpcomponents:httpclient:4.5.13'
Then I get this error in android studio
`httpclient` defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for `httpclient` use `HttpUrlConnection` or `okhttp` instead), or repackaging the library using something like `jarjar`.
Ok, so I am using the wrong version so I run build scan and I see this so I bring this one in instead of the other version (android studio now sees HttpClient and can import it at this point)
I still get the same error though about conflicting android libs.
QUESTION: How do I fix the red in my legacy project and not have this error either?
My best bet seems to ignore the error. Will I have issues that I am not seeing though in the future?

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.

"com.dsi.ant.plugins.antplus.pcc does not exist" error for ANT+ in Android Studio 2.1.3

I am trying to use the runnerup project but I get the below error. My Android Studio is 2.1.3:
I am adding one more thing, I have faced same problem and fixed by downloading below source code via below github link and placed on ANT-Android-SDKs folder (if folder is empty).
https://github.com/ant-wireless/ANT-Android-SDKs/tree/c35bcf8ee9b6379e405693dbd6bec506ec533669
I believe you do not have the correct ant+ library
For the runner up project you need to make sure that you have the code pointing towards the correct .jar file. In this case I do not think it is picking up the ../ANT-Android-SDKs/ANT+_Android_SDK/API/antpluginlib_3-1-0.jar in your hrdevice build.gradle.
dependencies {
provided files('libs/samsung_ble_sdk_200.jar')
compile files('../ANT-Android-SDKs/ANT+_Android_SDK/API/antpluginlib_3-1-0.jar')

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

The parameter is incorrect

When I try to add a service reference to my project in Visual Studio I keep getting the error " The parameter is incorrect" I know it's not the code because it doesn't happen on my coworkers computer. I have uninstalled and reinstalled Visual Studio to see if the problem is with my installation. But that doesnt seem to fix it.
I am using visual Studio 2012.
Did anyone come across this issue before? Please help!
I had this problem with a project that was copied out of ClearCase. the .csproj file still had the reference telling visual studio that its still under CC. I removed the following references and it worked.
<SccProjectName>Rational ClearCase</SccProjectName>
<SccLocalPath>Rational ClearCase</SccLocalPath>
<SccAuxPath>Rational ClearCase</SccAuxPath>
<SccProvider>Rational ClearCase</SccProvider>
I had the same issue after updating SQLite plugin for windows phone.
It seems like the sqlite-net-wp8 project (which is a wrapper to work with the plugin) had some import method from that plugin and when the version changed the wrapper didn't work anymore.
The solution was to downgrade the sqlite plugin to a version that is compatible with the wp8 wrapper.
Edit: The wrapper had an update so I've upgraded both the plugin and wrapper and now the issue is fixed.
If it shows any project in your solution with "(failed)" next to it's name try to remove it and re-add it to your solution and it will tell you what the issue exactly is.
In addition to Frisons answer - the issue works aswell the other way round:
If you are using ClearCase, make sure that the entries mentioned by Frison are available in your project file. I just had this case that one of the projects in my solution did not (however) had these entries and i got the very same error. Adding these lines fixed this issue for me.
I got the same error for WindowsPhone project, after make a clear manifest the error disappeared.

Resources