apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

fail on `cordova platform add android` #1660

Closed shutaozhenzhen closed 7 months ago

shutaozhenzhen commented 7 months ago

Bug Report

Problem

What is expected to happen?

What does actually happen?

cordova platform add android
Using cordova-fetch for cordova-android@^10.1.2
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.foxdebug.acodefree
        Name: Acode
        Activity: MainActivity
        Android target: android-33
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@10.1.2
Installing "admob-plus-cordova" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-plugin-consent" for android
Subproject Path: CordovaLib
Subproject Path: app
ENOENT: no such file or directory, open 'C:\Users\user\Documents\workplace\acode编译\Acode\platforms\android\app\src\main\java\org\apache\cordova\file\FileUtils.java'

Information

trying to build Acode on windows

Command or Code

Environment, Platform, Device

Version information

Checklist

breautek commented 7 months ago

The problem comes from their before_prepare hook: https://github.com/deadlyjack/Acode/blob/main/hooks/update-mimetype.js

It can't modify files platform files on before_prepare because prepare is what setups those files... They probably want after_prepare instead...

This isn't a bug with cordova-android, so I'm closing this issue.