(UE4-27) Problem with rungradle... What's gradle? Also Java could not create virtual machine HELP

Hello, I’m absolutely new to Unreal and development. I just wanted to connect my oculus quest (1) to Unreal 4.27.2 and I followed the unreal guidance: installed android studio 4.0 with the sdk, ndk, java, and unreal project setting. I’m trying to compile the VR template, nothing fancy. Next to the “Play” button, there’s the “Launch” button. There I can see my device and I can try to launch the application inside my headset. But I get the “Launch failed” message. Here’s a relevant (I think) piece of the log:

UEDeployAndroid.MakeApk: ====04/04/2022 22:07:19====PERFORMING FINAL APK PACKAGE OPERATION=====-arm64===========================================
UEDeployAndroid.CleanCopyDirectory: Copied file C:\Users\User\Documents\Unreal Projects\VR_Template\Intermediate\Android\arm64\gradle\app\src\main\assets\UE4CommandLine.txt.
UEDeployAndroid.CreateRunGradle:
UEDeployAndroid.CreateRunGradle: Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UEDeployAndroid.RunCommandLineProgramWithExceptionAndFiltering: Making .apk with Gradle…
UEDeployAndroid.FilterStdOutErr: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: The Gradle Daemon.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: FAILURE: Build failed with an exception.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * What went wrong:
UEDeployAndroid.FilterStdOutErr: Unable to start the daemon process.
UEDeployAndroid.FilterStdOutErr: This problem might be caused by incorrect configuration of the daemon.
UEDeployAndroid.FilterStdOutErr: For example, an unrecognized jvm option is used.
UEDeployAndroid.FilterStdOutErr: Please refer to the User Manual chapter on the daemon at The Gradle Daemon
UEDeployAndroid.FilterStdOutErr: Process command line: C:\Program Files (x86)\Java\jre1.8.0_321\bin\java.exe -XX:MaxHeapSize=4096m -Xmx9216m -Dfile.encoding=windows-1252 -Duser.country=IT -Duser.language=it -Duser.variant -cp C:\Users\User.gradle\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.1.1
UEDeployAndroid.FilterStdOutErr: Please read the following process output to find out more:
UEDeployAndroid.FilterStdOutErr: -----------------------
UEDeployAndroid.FilterStdOutErr: Invalid maximum heap size: -XX:MaxHeapSize=4096m
UEDeployAndroid.FilterStdOutErr: The specified size exceeds the maximum representable size.
UEDeployAndroid.FilterStdOutErr: Error: Could not create the Java Virtual Machine.
UEDeployAndroid.FilterStdOutErr: Error: A fatal exception has occurred. Program will exit.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * Try:
UEDeployAndroid.FilterStdOutErr: 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.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * Get more help at https://help.gradle.org
Log.WriteException: ==============================================================================
Log.WriteException: ERROR: cmd.exe failed with args /c “C:\Users\User\Documents\Unreal Projects\VR_Template\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
Log.WriteException: (see C:\Users\User\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\Log.txt for full exception trace)
Log.WriteException:
Log.WriteException: BuildException: cmd.exe failed with args /c “C:\Users\User\Documents\Unreal Projects\VR_Template\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramWithExceptionAndFiltering(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 1740
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, TargetType InTargetType, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk, Boolean bDisallowExternalFilesDir, Boolean bSkipGradleBuild) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 4210
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bIsDataDeploy, Boolean bSkipGradleBuild) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 4801
Log.WriteException: in AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:riga 1568
Log.WriteException: in Project.Deploy(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\DeployCommand.Automation.cs:riga 54
Log.WriteException: in BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:riga 219
Log.WriteException: in BuildCookRun.ExecuteBuild() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:riga 39
Log.WriteException: in AutomationTool.BuildCommand.Execute() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:riga 263
Log.WriteException: in AutomationTool.Automation.Execute(List1 CommandsToExecute, Dictionary2 Commands) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:riga 547
Log.WriteException: in AutomationTool.Automation.Process(String[] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:riga 511
Log.WriteException: in AutomationTool.Program.MainProc(String[] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 175
Log.WriteException: in AutomationTool.Program.<>c__DisplayClass1_0.b__2() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 87
Log.WriteException: in AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:riga 739
Log.WriteException: in AutomationTool.Program.Main(String[] Arguments) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 87
Log.WriteException: ==============================================================================

Thanks in advance

What’s gradle?

Gradle is a build system (and dependency tool) heavily used for Java and Kotlin development. It’s the build system used for most Android development.

Java could not create virtual machine

I notice your Java path is C:\Program Files (x86)\Java\ which suggests you might be using the 32-bit version. I think I remember someone I know encountering an issue where it just refused to accept any value as valid for the MaxHeapSize when they were mistakenly running the 32-bit version on a 64-bit Windows… and that does appear to be the error you’re getting which prevents it from initializing the JVM.

If you’re running a 64-bit version of Windows, I would uninstall Java, go make sure you have the installer for the 64-bit version, reinstall, and try again. Worst-case, even if it doesn’t fix the problem, at least you’re running the correct Java version afterwards.

Ehi, thankyuo very much for your answer, seems like it pointed me toward the right direction. I installed Java x64 and the log told me that android sdk 33.0.0 rc2 is corrupted because it could not find dx.bat. I’ve found a video on youtube speaking about this exact problem. The author suggested to change 2 files name from “d8.bat” to “dx.bat” and from “d8.jar” to “dx.jar”. I also downloaded latest java jdk hoping to solve the gradle problem. I did not… Anyway I still need help because of the problems inside new log
UEDeployAndroid.MakeApk: ====05/04/2022 12:47:54====PERFORMING FINAL APK PACKAGE OPERATION=====-arm64===========================================
UEDeployAndroid.CleanCopyDirectory: Copied file C:\Users\User\Documents\Unreal Projects\VR_Template_2\Intermediate\Android\arm64\gradle\app\src\main\assets\UE4CommandLine.txt.
UEDeployAndroid.CreateRunGradle:
UEDeployAndroid.CreateRunGradle: Creating rungradle.bat to work around commandline length limit (using unused drive letter Z:)
UEDeployAndroid.RunCommandLineProgramWithExceptionAndFiltering: Making .apk with Gradle…
UEDeployAndroid.FilterStdOutErr: To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: The Gradle Daemon.
UEDeployAndroid.FilterStdOutErr: Daemon will be stopped at the end of the build stopping after processing
UEDeployAndroid.FilterStdOutErr: > Task :app:preBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:preDebugBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:preBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:preDebugBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:compileDebugAidl NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:preBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:preDebugBuild UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:compileDebugAidl NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :app:compileDebugAidl UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:packageDebugRenderscript NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:packageDebugRenderscript NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :app:compileDebugRenderscript NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :app:generateDebugBuildConfig UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:javaPreCompileDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:generateDebugResValues UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:generateDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:compileDebugRenderscript NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:generateDebugResValues UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:generateDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:packageDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:generateDebugResValues UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:compileDebugRenderscript NO-SOURCE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:generateDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:packageDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:mergeDebugResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:extractDeepLinksDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:extractDeepLinksDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:processDebugManifest UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:extractDeepLinksDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:processDebugManifest UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :app:processDebugManifest UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:compileDebugLibraryResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:parseDebugLocalResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:generateDebugRFile UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:compileDebugLibraryResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:parseDebugLocalResources UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:generateDebugRFile UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: aapt2.exe W 04-05 12:48:09 8452 632 LoadedArsc.cpp:657] Unknown chunk type ‘200’.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: > Task :app:processDebugResources
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:generateDebugBuildConfig UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:javaPreCompileDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:compileDebugJavaWithJavac
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:generateDebugBuildConfig UP-TO-DATE
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:javaPreCompileDebug UP-TO-DATE
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:compileDebugJavaWithJavac
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: > Task :downloader_library:bundleLibCompileToJarDebug
UEDeployAndroid.FilterStdOutErr: > Task :permission_library:bundleLibCompileToJarDebug
UEDeployAndroid.FilterStdOutErr: Note: Z:\permission_library\src\main\java\com\google\vr\sdk\samples\permission\PermissionFragment.java uses or overrides a deprecated API.
UEDeployAndroid.FilterStdOutErr: Note: Recompile with -Xlint:deprecation for details.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: > Task :app:compileDebugJavaWithJavac FAILED
UEDeployAndroid.FilterStdOutErr: The following annotation processors are not incremental: lifecycle-compiler-2.0.0.jar (androidx.lifecycle:lifecycle-compiler:2.0.0).
UEDeployAndroid.FilterStdOutErr: Make sure all annotation processors are incremental to improve your build speed.
UEDeployAndroid.FilterStdOutErr: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:562: error: variable PackagedForOculusMobile is already defined in class GameActivity
UEDeployAndroid.FilterStdOutErr: public boolean PackagedForOculusMobile = false;
UEDeployAndroid.FilterStdOutErr: ^
UEDeployAndroid.FilterStdOutErr: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:565: error: method AndroidThunkJava_IsOculusMobileApplication() is already defined in class GameActivity
UEDeployAndroid.FilterStdOutErr: public boolean AndroidThunkJava_IsOculusMobileApplication()
UEDeployAndroid.FilterStdOutErr: ^
UEDeployAndroid.FilterStdOutErr: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:2846: error: variable hasVR is already defined in method onCreate(Bundle)
UEDeployAndroid.FilterStdOutErr: boolean hasVR = false;
UEDeployAndroid.FilterStdOutErr: ^
UEDeployAndroid.FilterStdOutErr: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:2848: error: variable vrIntent is already defined in method onCreate(Bundle)
UEDeployAndroid.FilterStdOutErr: Intent vrIntent = new Intent(Intent.ACTION_MAIN, null);
UEDeployAndroid.FilterStdOutErr: ^
UEDeployAndroid.FilterStdOutErr: Z:\app\src\main\java\com\epicgames\ue4\GameActivity.java:2853: error: variable pkgManager is already defined in method onCreate(Bundle)
UEDeployAndroid.FilterStdOutErr: PackageManager pkgManager = getApplicationContext().getPackageManager();
UEDeployAndroid.FilterStdOutErr: ^
UEDeployAndroid.FilterStdOutErr: Note: Some input files use or override a deprecated API.
UEDeployAndroid.FilterStdOutErr: Note: Recompile with -Xlint:deprecation for details.
UEDeployAndroid.FilterStdOutErr: 5 errors
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: FAILURE: Build failed with an exception.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * What went wrong:
UEDeployAndroid.FilterStdOutErr: Execution failed for task ‘:app:compileDebugJavaWithJavac’.
UEDeployAndroid.FilterStdOutErr: > Compilation failed; see the compiler error output for details.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * Try:
UEDeployAndroid.FilterStdOutErr: 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.
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: * Get more help at https://help.gradle.org
UEDeployAndroid.FilterStdOutErr:
UEDeployAndroid.FilterStdOutErr: BUILD FAILED in 19s
UEDeployAndroid.FilterStdOutErr: 32 actionable tasks: 6 executed, 26 up-to-date
Log.WriteException: ==============================================================================
Log.WriteException: ERROR: cmd.exe failed with args /c “C:\Users\User\Documents\Unreal Projects\VR_Template_2\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
Log.WriteException: (see C:\Users\User\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.27\Log.txt for full exception trace)
Log.WriteException:
Log.WriteException: BuildException: cmd.exe failed with args /c “C:\Users\User\Documents\Unreal Projects\VR_Template_2\Intermediate\Android\arm64\gradle\rungradle.bat” :app:assembleDebug
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.RunCommandLineProgramWithExceptionAndFiltering(String WorkingDirectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 1740
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, TargetType InTargetType, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk, Boolean bDisallowExternalFilesDir, Boolean bSkipGradleBuild) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 4210
Log.WriteException: in UnrealBuildTool.UEDeployAndroid.PrepForUATPackageOrDeploy(FileReference ProjectFile, String ProjectName, DirectoryReference ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, UnrealTargetConfiguration Configuration, Boolean bIsDataDeploy, Boolean bSkipGradleBuild) in D:\Build++UE4\Sync\Engine\Source\Programs\UnrealBuildTool\Platform\Android\UEDeployAndroid.cs:riga 4801
Log.WriteException: in AndroidPlatform.Deploy(ProjectParams Params, DeploymentContext SC) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Android\AndroidPlatform.Automation.cs:riga 1568
Log.WriteException: in Project.Deploy(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\DeployCommand.Automation.cs:riga 54
Log.WriteException: in BuildCookRun.DoBuildCookRun(ProjectParams Params) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:riga 219
Log.WriteException: in BuildCookRun.ExecuteBuild() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:riga 39
Log.WriteException: in AutomationTool.BuildCommand.Execute() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:riga 263
Log.WriteException: in AutomationTool.Automation.Execute(List1 CommandsToExecute, Dictionary2 Commands) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:riga 547
Log.WriteException: in AutomationTool.Automation.Process(String[] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:riga 511
Log.WriteException: in AutomationTool.Program.MainProc(String[] Arguments, StartupTraceListener StartupListener) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 175
Log.WriteException: in AutomationTool.Program.<>c__DisplayClass1_0.b__2() in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 87
Log.WriteException: in AutomationTool.InternalUtils.RunSingleInstance(Func`1 Main) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:riga 739
Log.WriteException: in AutomationTool.Program.Main(String[] Arguments) in D:\Build++UE4\Sync\Engine\Source\Programs\AutomationTool\Program.cs:riga 87
Log.WriteException: ==============================================================================
Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

EDIT:

It appears that you cannot activate oculus plugin and openxr plugin at the same moment.

I want to leave a youtube video here for others:

I am now able to launch (don’t even want to try to build right now…). This thread is solved. Thanks