skip to Main Content

I can’t run my android studio project because of this error.

Execution failed for task ‘:app:parseDebugLocalResources’.

A failure occurred while executing com.android.build.gradle.internal.res.ParseLibraryResourcesTask$ParseResourcesRunnable
Failed to parse XML file ‘C:UsersblackAndroidStudioProjectsStockProfitappbuildintermediatespackaged_resdebugxmldata_extraction_rules.xml’

also same error with short message:

Premature end of file.

my tried solutions but did not work:

  • deleted build folder
  • invalidated cache
  • cleaned and rebuild project
  • updated the application and packages
  • increased memory in gradle.properties

2

Answers


  1. Chosen as BEST ANSWER

    Solved.

    found empty xml file and I did not how it happned to be there it is called: data_extraction_rules.xml in res folder

    it is empty so removed it. done.


  2. ‘Premature end of file’ suggests that the file is not a properly formatted XML file, the file is empty, the file cannot be read, or less likely, the file does not exist.

    Have you tried opening the file (C:UsersblackAndroidStudioProjectsStockProfitappbuildintermediatespackaged_resdebugxmldata_extraction_rules.xml) in Android Studio and checking its formatting?

    I’m not sure if it is required here, but some compilers/parsers require a trailing carriage return as the last character of the file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search