2

After Android SDK updated to 6.0 today, I am unable to run my project. The error is:

Gradle 'Alphaets' project refresh failed.
Cause:java.io.FileNotFoundException: ...\project_name\src\main\AndroidManifest.xml(The system cannot find the path specified).

Actually, it should be ...\project_name\app\src\main\AndroidManifest.xml. Part ...\app\... is missing. There is no \src\ folder in \project_name\. That's why AndroidStudio cannot find AndroidManifest.xml.

What causes such an error? How should I revise the gradle file to include the correct path of AndroidManifest.xml?

Besides, my build.gradle(Module:app) did not show up in the GradleScripts any more. I have to go to the absolute path of that file and open it with notepad++. What's wrong with that?

Leon
  • 169
  • 3
  • 14

2 Answers2

1

It turns out to be redundant codes in file "build.gradle(Project: MyProject)". I added these code:

dependencies{}

This prevents the file "build.gradle(Module:app)" from being loaded. I did not know the principle, but after I deleting these lines, the project works.

Leon
  • 169
  • 3
  • 14
0

I am also had the same Issue, when I am trying to open existing project.

My problem is related to Facebook resource(D:\GiriBabu_project\CalendarApp-24-08-2016\CalenderApp\app\build\intermediates\res\merged\debug\drawable-mpdpi\some.png) not found.

I just update the existing Facebook-android sdk. then It resolved that issue.

So this issue always regarding to your dependencies. Just find the error regarding to which package in your dependencies and update it.

Another mistake may be your SDK version not match with the in gradle version. so you should change the SDK versions also. (existing projects SDK version numbers not update automatically)

if you don't know the proper version number just create the new project, then automatically know the gradle version and sdk versions.

Kona Suresh
  • 1,836
  • 1
  • 15
  • 25