1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android Studio res file error "The file name must end with .xml" when trying to run mediapipe exampl

Discussion in 'Android Development' started by ozth89, Feb 17, 2022.

  1. ozth89

    ozth89 Lurker
    Thread Starter

    Hello! I am a AI software developer but I am very new to android development and its overall architecture and IDE(Android Studio).

    I am trying to create an android version of my AI app. I am trying to estimate and track pose of hands in real-time on camera. There is a example solution on a GitHub Repo from Google with their Media Pipe Machine Learning Library/API tool kit right here: https://github.com/google/mediapipe/tree/master/mediapipe/examples/android/solutions

    This should be an easily runnable solution with instructions here: https://google.github.io/mediapipe/getting_started/android_solutions.html
    I follow this instructions including running create_win_symlinks.bat since I am on a windows machine.

    I am running into what seems to be a very silly and novice issue when I am trying to build this solution but I have had no luck trying to solve it or finding an answer.

    The error message is: the file name must end with .xml and it is referring to my res file

    So replicating my steps:
    I import this project into my Android Studio. I then run create_win_symlinks.bat as administrator to create the res directory symlinks.

    Then finally, I sync project with Grade Files. That ends up being succesful and I finally try to run the hands solution on the Pixel 2 emulator but I get an project error saying

    the file name must end with .xml

    This is pointing to my res inside the hands solution folder. It gives me the same error when I try to run face mesh and face detection to their respective res folder.

    I checked the res file and it is a unspecified file(in file explorer) that seems to just point to the res in the project directory that includes all the .xml files for the UI

    I am using the latest version of Android Studio and I upgraded the gradle plugin as it was recommending me to and that did not solve the problem either. I posted screenshots of the error message and my file contents and project directory.

    Any pointers as to what I need to do to fix this problem?


    GLzCj.png






    UlZiD.png
    UlZiD.png
     



    1. Download the Forums for Android™ app!


      Download

       
  2. GameTheory

    GameTheory Android Expert

    In the screenshot you posted, I see a file named "res" under the "BUILD" file. The error seems to be telling you that the "res" file should be renamed to "res.xml".
     
    James_Watson likes this.
  3. ozth89

    ozth89 Lurker
    Thread Starter

    That is what I initially tried, renaming it but the file contains invalid XML.
    The res file contains ```../../../res``` which is pointing to the res folder under the solutions root. That contains a directory of xml files.
     
Loading...
Similar Threads - Android Studio res
  1. sg72
    Replies:
    3
    Views:
    588
  2. Jose Luis Rodriguez
    Replies:
    1
    Views:
    608
  3. ygt
    Replies:
    1
    Views:
    733
  4. Jensonbotones
    Replies:
    0
    Views:
    515
  5. Attila Gubanyi
    Replies:
    0
    Views:
    682
  6. Dev101
    Replies:
    0
    Views:
    707
  7. Atharv Thorat
    Replies:
    0
    Views:
    877
  8. minimum nebula
    Replies:
    0
    Views:
    947
  9. JaySantos
    Replies:
    1
    Views:
    682
  10. Monica M Hail
    Replies:
    0
    Views:
    920

Share This Page

Loading...