Fail test in VSC using Robot Framework - visual-studio-code

Learning RobotFramework using VSC.
Got downloaded chromedriver_win32.zip for Chrome 98 from here::
https://chromedriver.storage.googleapis.com/index.html?path=98.0.4758.80/
When I run my 1st test in VSC I get fail and the message shows:
This version of ChromeDriver only supports Chrome version 93
Current browser version is 98.0.4758.82 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe
Why it says Chrome version 93 when it's 98?
Thanks.

You have to replace that chromedriver.exe by the one you have downloaded and extracted.
You need to know where that executable is (being found from the PATH environment variable).

Related

Could not open settings generic class cache for settings file Flutter

When I clone the project from GitHub and execute the program it throws this error
Please help all thanks
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 61
"Unsupported class file major version 61" indicates java 17, which is used by Gradle.
https://stackabuse.com/bytes/fix-java-error-unsupported-class-file-major-version-63/
This indicates major class version and corresponding Java versions.
https://docs.gradle.org/7.3/release-notes.html
Per this link, Java 17 support was added circa Gradle 7.3, so either upgrade to a more recent version of Gradle, or change your settings to use an earlier version of Java (such as JAVA_HOME if using the CLI).
If you run flutter doctor, you probably will see:
[!] Android Studio (version 2022.1)
✗ Unable to find bundled Java version.
https://github.com/flutter/flutter/issues/118502 seems to be the latest issue in which this crops up. https://github.com/flutter/flutter/issues/106674 notes they reverted a buggy change, but it hasn't hit stable yet, so you'll have to symlink the bundled JRE folder as a workaround til the next AS update.
e.g. for mac, you can use:
cd /Applications/AndroidStudio.app/Contents
ln -s jbr jre

Could not open settings generic class cache for settings file '

I reinstalled my android studio since the sdk was not found and so on. After re installing java jdk and android studio , everything worked well until I got an error saying 'Could not initialize class org.codehaus.groovy.runtime.InvokerHelper' which I solved by changing the Gradle version. And now the error is 'Type 'FlutterTask' property 'assets' is missing an input or output annotation.'
FAILURE: Build failed with an exception.
What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\loran\ASProjects\xylophone-flutter\android\settings.gradle' (C:\Users\loran.gradle\caches\6.8.2\scripts\4mawlyb2l5e9tefyvnpxva1kg).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 46s
Exception: Gradle task assembleDebug failed with exit code 1
I also had this problem So I did install java 8
You might have Java 13 So install Java 8
Java JDK 16 is the one that seems to lead to this issue try downgrading by downloading a lower version of JDK preferable JDK 8 or 11
To future individuals who will run to this error. Here is the link to download the JDK enjoy your coding experience don't forget to change the path too.
https://www.oracle.com/java/technologies/javase-downloads.html
mainly you have jdk16 i tried to install java 8 and set env to java 8 it worked for me
Try installing the latest Gradle package gradle-7.1.1, if you are using Java JDK 16 installed. To do this open android/gradle/wrapper/gradle-wrapper.properties file and under distribution url, update the gradle version to 7.1.1 (or the latest). After that, inside your Flutter project directory, run the following command in the terminal:
cd android && ./gradlew
I removed the JAVA_HOME path to the JAVA download and changed JAVA_HOME path to the following:
C:\Program Files\Android\Android Studio\jre
I am now coding
FOUND IT !
No need to change your JDK version, follow the steps to resolve the issue:
check your java version and remember it, use "java -version" in terminal
go to your android studio path installation
then in: Android Studio/jre/ open the file named "release"
take attention of the value of JAVA_VERSION field
if it's not the same as the java version on your computer, just change it with the version installed on your computer.
That's it, i hope it will resolve your issue like it resolves mine.
Try it and give a feedback.
Try this!
Remove package android from the top of settings.gradle. This helped me out.
If this error occurs, this might because you have installed the latest JDK such as JDK 16. You download and install JDK 8 and uninstall JDK 16. Then restart the desktop/laptop and try launch and run flutter run again. It should be working fine.
In my case, on Windows 10, my JAVA_HOME was set to JAVA SE 16 C:\Program Files\Java\jdk-16 and when I looked at the release file in java jre in android studio, C:\Program Files\Android\Android Studio\jre\release, I found that the the JAVA_VERSION WAS "11.0.10" (java 11) for short. So I changed the java installation on my PC to Java 11, update JAVA_HOME in my environment variables to point to the new java (C:\Program Files\Java\jdk-11.0.12) and restarted android studio, Then everything worked.
You can get your java 11 from here.
https://www.oracle.com/java/technologies/javase-jdk11-downloads.html. Change 11 to 8, 16 etc to get the download link for the java version you need.
The problem has to do with having Java 13 or 16 installed on your computer. The current version of Flutter does not work with Java 13 and 16. Just uninstall either of these that you may have installed and installed Java 8 or Java 11. Restart your computer to effect the update. Everything should be fine afterwards
I got this error when using flutter. I fixed it ensuring the android-studio-dir path was set correctly.
You set it up using flutter config --android-studio-dir="android studio path".
Then run flutter doctor and ensure flutter can see Android Studio
In 'adnroid/gradle/wrapper/gradle-wrapper.properties'
Change distributionUrl to version 7.0.1
In 'android/build.gradle'
Change 'com.android.tools.build:gradle' to version 4.2.0
Java 11 is the only supported version by Flutter as for now. It compiles and installs.
Previously I had this error using Java 19 and Java 8.
You might want update your gradle version.
Check the supported gradle <-> kotlin <-> java version on their page.
You can try this, it works for me.
Open the android module to a new window and automatically download all necessary libraries after successfully building finished run the app.
Simply go to your Android Studio path -> C:\Program Files\Android\Android Studio
open jbr folder -> copy all files -> then go back -> paste all the files in the jre folder and "replace the files in the destination".
It works for me in two different laptops. I have latest jdk version - 19.0.2
The error message you're seeing is related to the flutter build process and it occurs when a required input or output annotation is missing from the assets property of the FlutterTask.
task buildFlutter(type: FlutterTask) {
// Add the #Input annotation to the assets property
#Input List<String> assets = ["assets/images/", "assets/fonts/"]
}
Try to disable AVAST, check system vatiables path for JDK and SDK, clear cache with yarn.

Issue in setting up the Android emulator with React native

I am fairly new to React native and trying to set up Android environment with Visual studio. All the installation has been fairly successful, however, when I try to run the sample app on the android emulator executing the npx react-native run-android command it shows below error -
'C:\Users\Home' is not recognized as an internal or external command,
operable program or batch file.
error Failed to launch emulator. Reason: Could not start emulator within 30 seconds..
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
However, when i execute adb devices on visual studio, it shows the list of emulator connected -
List of devices attached
emulator-5554 device
What could be the possible reason? Is this because my users name is Home PC? (Is this because there is a space in between) and it is not able to get the correct path?
This is because your java version is updated to the latest version and gradle is not supported with the installed version. what you can do is update the gradle as well
So go to gradle/wrapper folder inside the android folder
Edit gradle-wrapper.properties file and replace distributionUrl
with following value
https\://services.gradle.org/distributions/gradle-6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
I too faced the same issue.The problem is with the JDK. From JDK 14 i downgraded to JDK 11(LTS) version. And it worked.
Hope it helps.
Install Java 8 version, which is available Java 8 download
Gradle is not keeping up with the Java Latest versions, so roll back
to previous versions

Visual Studio in OSX: Installing Android SDK Platform-Tools v26.0.0 failed

I'm trying to compile to Android using Unity3D. The normal procedure is installing Android Studio. However I want to use Visual Studio Community (Preferences -> SDK Locations -> Android) to avoid downloading Android Studio because I do not plan to use it:
The rest of components seems to be installed well. However the Android SDK Platform-Tools installation outputs the following error:
Installing Android SDK Platform-Tools v26.0.0 failed
Could not find a
part of the path
"/Users/username/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/package.xml".
I have been able to install it after creating an empty folder named platform-tools manually. Unfortunately it seems it has not been installed correctly because the folder only contains one file named: package.xml of much less than 7 Mb. Unity also output the following error:
Android SDK is outdated
SDK Tools version 0.0.0 < 24.0.0.
Workarounds seem easy (both can be downloaded from here: https://developer.android.com/studio/index.html):
Install Android Studio: it seems the easier and quick way, but >500Mb HardDisk space
Install only command line tools: not so easy and quick
However I guess I'm very stubborn and curious: why could it be failing?
Hey mate for me it worked to create the missing folder manually.
So this folder:
/Users/username/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/
Is actually missing so if you do this:
$ cd /Users/username/Library/Developer/Xamarin/android-sdk-macosx/
$ mkdir platform-tools
And try to run the installer from VS UI
it should install the platform-tools package.
Complement from #benjamingranados:
Also check that the destiny folder in the "Locations" Tab is the same.

Android SDK: How to set up old versions? eg. gingerbread

my goal here is to run an android emulator with various old versions of Android to test web apps. I am an android newbie. I have a Nexus 7 with Jellybean. The bugs on the web apps are reported in older versions.
So far I have;
Installed Android SDK on a Windows 8 desktop, created and run emulators but it's limited to Android 4.2 only (Jellybean)
I think the next step is to run the SDK Manager -- Ecplipse > Window > Android SDK Manager
Doing this reports that the Manager will show shortly -- nothing happens. In the console I get this error;
[2013-02-09 16:31:49 - SDK Manager] [SDK Manager] \adt-bundle-windows-x86_64\sdk\tools\lib\\find_java.exe was unexpected at this time.
Running find_java.exe from the command line gives:
D:\Program Files (x86)\adt-bundle-windows-x86_64>sdk\tools\lib\\find_java.exe
C:\Program Files\Java\jre7\bin\java.exe
D:\Program Files (x86)\adt-bundle-windows-x86_64>where java
C:\Program Files\Java\jre7\bin\java.exe
C:\Windows\System32\java.exe
I have updated the PATH environment var to include the jre7 directory as above, and added a ANDROID_SDK_HOME as D:\Users\myuser_000\Documents\Workspace -- devices I create appear in a .android\avd sub-directory.
I am running the SDK on Windows 8, installed in D:\Program Files (x86)\adt-bundle-windows-x86_64
Is running the SDK Manager the correct action?
Any ideas what would cause the SDK Manager not to display?
Thank you!
The error was in the android.bat file.
I edited the following to comment out the call to find_java.bat and hard coded to my installed version of Java.
rem Check we have a valid Java.exe in the path.
set java_exe="C:\Program Files\Java\jre7\bin\java"
rem call lib\find_java.bat
Hope this helps someone in the future.
Something that may have complicated the issue was windows 8 catching android.bat as an unsafe program and automatically stopping it. I saw this when manually trying to run the batch file.