Open xiaoniuba opened 1 week ago
You can download the pt file and use the chinese_clip deploy script to get the onnx. That's all you lack.
I need to be back home to search for the models.
I have converted imgfp32-sim.onnx, txtfp32-sim.onnx. I failed to Make Project, error: resource xml/data_extraction_rules (aka demo.android_onnx_sam:xml/data_extraction_rules) not found. error: resource xml/backup_rules (aka demo.android_onnx_sam:xml/backup_rules) not found. error: resource mipmap/ic_launcher (aka demo.android_onnx_sam:mipmap/ic_launcher) not found. error: resource string/app_name (aka demo.android_onnx_sam:string/app_name) not found. error: resource mipmap/ic_launcher_round (aka demo.android_onnx_sam:mipmap/ic_launcher_round) not found. error: resource style/Theme.Android_onnx_sam (aka demo.android_onnx_sam:style/Theme.Android_onnx_sam) not found.
maybe you can rebuild resources and the UI.
this is the answer I asked 通义千问
这些错误信息表明你的 Android 项目在编译时找不到指定的资源文件。具体来说,编译器在 xml/
, mipmap/
, string/
和 style/
目录下没有找到对应的资源文件。以下是每个错误的具体解释和可能的解决方案:
xml/data_extraction_rules
和 xml/backup_rules
未找到:
res/xml/
目录中。如果不需要这些文件,可以检查项目的代码和配置文件(如 AndroidManifest.xml
),看看是否有引用到这些文件的地方,并移除这些引用。mipmap/ic_launcher
和 mipmap/ic_launcher_round
未找到:
ic_launcher
是标准的应用图标,而 ic_launcher_round
是用于圆形图标的版本。res/mipmap-*/
目录中(例如 mipmap-hdpi
, mipmap-mdpi
, mipmap-xhdpi
等)。如果没有这些文件,你可以创建新的图标或者从其他地方复制现有的图标文件。你也可以使用 Android Studio 的 Image Asset
工具来生成这些图标。string/app_name
未找到:
res/values/strings.xml
文件中有定义 app_name
字符串。例如:
<resources>
<string name="app_name">Your App Name</string>
</resources>
style/Theme.Android_onnx_sam
未找到:
res/values/styles.xml
文件中有定义 Theme.Android_onnx_sam
样式。例如:
<resources>
<style name="Theme.Android_onnx_sam" parent="Theme.MaterialComponents.DayNight">
<!-- Customize your theme here. -->
</style>
</resources>
如果你不想自定义主题,可以使用一个内置的主题作为父主题,比如 Theme.MaterialComponents.Light
或 Theme.MaterialComponents.Dark
。
Build > Clean Project
。Build > Rebuild Project
。File > Sync Project with Gradle Files
来确保项目与 Gradle 配置同步。通过以上步骤,你应该能够解决这些资源未找到的问题。如果问题仍然存在,请检查具体的代码引用和资源配置,确保没有任何拼写错误或路径错误。
Hello, the project lacks files. Could you provide the files in src?