0
org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:mergeDebugResources'.
    at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:99)
    at org.gradle.initialization.exception.DefaultExceptionAnalyser.collectFailures(DefaultExceptionAnalyser.java:65)
    at org.gradle.initialization.exception.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:39)
    at org.gradle.initialization.exception.StackTraceSanitizingExceptionAnalyser.transform(StackTraceSanitizingExceptionAnalyser.java:29)
    at org.gradle.initialization.DefaultGradleLauncher.finishBuild(DefaultGradleLauncher.java:174)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:165)
    at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:134)
    at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:58)
    at 
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
RahulVerma
  • 61
  • 2
  • Have you tried rebuilding project? – DaveAAA Jul 17 '19 at 23:56
  • yes i tried, it doesn't work, also tried with file->invalidate cache and restart that also wont work. – RahulVerma Jul 18 '19 at 13:16
  • 1
    In your **Terminal** section...type this ``gradlew assembleDebug --info```...you'll probably see the detailed error...from there we should know what to do. – DaveAAA Jul 18 '19 at 13:28
  • This is what i got ==> 7/18/2019 11:30 PM Gradle sync started 11:30 PM Project setup started 11:30 PM Gradle sync finished in 1 s 791 ms (from cached state) 11:31 PM Executing tasks: [:app:assembleDebug] 11:31 PM Emulator: emulator: ERROR: AdbHostServer.cpp:93: Unable to connect to adb daemon on port: 5037 11:31 PM Emulator: dsound: Could not initialize DirectSoundCapture 11:31 PM Emulator: dsound: Reason: No sound driver is available for .... few more like this. – RahulVerma Jul 18 '19 at 18:32
  • So the issue appears when running an emulator? – DaveAAA Jul 19 '19 at 00:01
  • yes, while running – RahulVerma Jul 19 '19 at 13:18
  • Okay try plugging your microphone back into your computer..and create another virtual device in AVD manager..check this link for more details https://stackoverflow.com/questions/53651779/error-launching-the-android-project-on-emulatorapi-28-on-windows – DaveAAA Jul 19 '19 at 14:24
  • Thanks for your reply, i am done with fixes, here in answer section i putted the Solution which works for me. – RahulVerma Jul 19 '19 at 14:37
  • Alright...great!!! – DaveAAA Jul 19 '19 at 14:56

2 Answers2

1

Finally after lots of search, I got The answer which works for me now - step 1 ==> goto [ Build --> clean project ] step 2 ==> Goto ["File -> Project Structure"] and Change "Android Gradle plugin version " to 3.3.2

step 3 ==> Restart Android Studio

Hope this will also works for you. ;-)

RahulVerma
  • 61
  • 2
0

Try to do the following

  1. Build - Rebuild project

or

2.go to “File” -> “Invalidate Caches/Restart”

or

  1. An invalid picture name may also cause the same (1.png....etc)

or

  1. path length restriction. I think it's 256 characters maximum.

    Relocate your project and the build will succeed.

Hope these will help. Thank you

Community
  • 1
  • 1
Vijaya Varma Lanke
  • 603
  • 2
  • 7
  • 19
  • Thanks for you answer, but 1,2 didn't work, and 3. there is no picture, just now i installed and trying to run hello program. => that might not be the reason. 4. This is my file Location -> "C:\Users\Rahul\AndroidStudioProjects\MyApplication4" => Is it ok ? – RahulVerma Jul 18 '19 at 13:16