Android studio java compiler error, cannot resolve R, build failed : I'm newbie here, I have some problem in my script

Hope you guys help me

[In this picture, My R script cannot resolve, and My Build failed, and Java Compiler error][1]


  [1]: https://i.stack.imgur.com/Pyn0Q.png

This build failed logs

    org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:mergeDebugResources'.
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	   at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	   at java.lang.Thread.run(Thread.java:745)
    Caused by: com.android.build.gradle.tasks.ResourceException: Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

and this Java Compiler error logs

    Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details

**FYI**

> I have done all the ways to solve this problem from various sources such as threads on this web, google, and youtube
but all did not work
I really hope that some of you will be kind enough to help me solve this problem

Thank You