File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -205,12 +205,31 @@ func ExtractECSBinary() (string, error) {
205205 ecsPath := filepath .Join (baseDir , libraryName )
206206 checkedPaths = append (checkedPaths , ecsPath )
207207
208+ // 添加详细的调试信息
208209 if info , err := os .Stat (ecsPath ); err == nil && ! info .IsDir () {
209210 // 找到文件,确保有执行权限
210211 if err := os .Chmod (ecsPath , 0755 ); err != nil {
211212 // 在某些 Android 版本上可能无法修改权限,但这通常不是问题
212213 }
213214 return ecsPath , nil
215+ } else if err == nil && info .IsDir () {
216+ debugInfo += fmt .Sprintf (" 警告: %s 是目录而不是文件\n " , ecsPath )
217+ } else {
218+ debugInfo += fmt .Sprintf (" 未找到: %s (错误: %v)\n " , ecsPath , err )
219+ }
220+
221+ // 如果这是一个目录,列出其内容
222+ if abiDir != "" {
223+ if entries , err := os .ReadDir (baseDir ); err == nil && len (entries ) > 0 {
224+ debugInfo += fmt .Sprintf (" %s 目录内容:\n " , baseDir )
225+ for _ , entry := range entries {
226+ entryType := "文件"
227+ if entry .IsDir () {
228+ entryType = "目录"
229+ }
230+ debugInfo += fmt .Sprintf (" - %s (%s)\n " , entry .Name (), entryType )
231+ }
232+ }
214233 }
215234 }
216235 }
You can’t perform that action at this time.
0 commit comments