chaquo / chaquopy

Chaquopy: the Python SDK for Android
https://chaquo.com/chaquopy/
MIT License
849 stars 133 forks source link

"The file name must end with .xml" #1293

Closed FrancisRSTemple closed 6 days ago

FrancisRSTemple commented 2 weeks ago

Chaquopy version

16.0.0.

Relevant parts of your build.gradle file

chaquopy {
    defaultConfig { }
    productFlavors {
        getByName("py311") { version = "3.11" }
    }
    sourceSets { }
}
android{

    defaultConfig {
        ndk {
            abiFilters += listOf("arm64-v8a", "x86", "x86_64")
        }
    }

  flavorDimensions += "pyVersion"
      productFlavors {
          create("py311") { dimension = "pyVersion" }
      }
}

Describe your issue

This error is coming from a generated file. I've been working on this project on my laptop and desktop, I only saw this error pop up on my laptop. If this file doesn't belong here, not really sure where else it would go and I'm assuming I shouhldn't just change the extension. Android Studio is unable to give me any incite into how to fix this problem. I can't run my app or view Previews because of it.

Error Message: The file name must end with .xml

absolute path: C:\codingProjects\\app\build\generated\res\resValues\py311\debug\venv\pyvenv.cfg

FrancisRSTemple commented 2 weeks ago

Seems like re-cloning the project fixed the issue. It would be nice to have some insight, if anyone has any ideas, as to where this random file could've came from in the first place.

mhsmith commented 2 weeks ago

I'm not sure what happened here. Chaquopy only creates Python virtual environments in app/build/python/env, and it doesn't touch the res directory at all . So my best guess is that this file was created either by something else in your build.gradle file, or by some other software like an IDE.