3

i am getting this issues after install JAVA 11 (LTS) and Visual studio 2022 Community Edition. and Andriod Studio. in my Brand new AMD PC (which has all the power to develop). But after intall all the required softwares. when i try to start the design (activity_main.xml) and try to preview the design. i am getting this error in the design windows.

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. enter image description here

Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • You should also mention the error message "Connection to the layout renderer failed. This may be caused by a misconfiguration of Java" to you question to make it more searchable/accessible. That said, it is indeed a bit strange that such a deprecation warning should cause this failure. – Hulk Jul 20 '21 at 05:42
  • I suppose you'll have to find out where the option to set this GC is configured, and remove it. See also: https://stackoverflow.com/questions/52239570/useconcmarksweepgc-is-deprecated-what-is-its-replacement – Hulk Jul 20 '21 at 05:48
  • ok, But this is a new PC it does not have anything pre installed. i installed the JAVA 11 (LTS) from https://www.oracle.com/in/java/technologies/javase-jdk11-downloads.html for which the Visual studio has asked for. i am not sure how could it be wrong. so please advise me a exact fix. since i am new to this andriod development and java as well. – net.navinkumar Jul 20 '21 at 06:11
  • provide me and commands that will do this job. – net.navinkumar Jul 20 '21 at 06:12
  • 1
    hi i found the solution. it seems the VS 2022 preview is not well build. now i installed VS 2019 Community edition. it's working good. thanks for your time in replying me. – net.navinkumar Jul 20 '21 at 17:30
  • Ok, glad your problem has been solved - feel free to write that as an answer and mark it as accepted so that other people will know there is a solution. – Hulk Jul 20 '21 at 21:37

1 Answers1

0

You should download JDK1.8.0_111 that will work