Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build for android #4

Open
jackiszhp opened this issue Nov 29, 2023 · 0 comments
Open

Can not build for android #4

jackiszhp opened this issue Nov 29, 2023 · 0 comments

Comments

@jackiszhp
Copy link

jackiszhp commented Nov 29, 2023

I got the following exception:

at new Api (/home/jack/ws/cordova/001/ct3/node_modules/cordova-android/lib/Api.js:65:30)
at patchTargetPlatform (/home/jack/ws/cordova/001/ct3/plugins/nodejs-mobile-cordova/install/hooks/both/after-prepare-patch-npm-packages.js:57:29)

class Api {
constructor(platform, platformRootDir, events) {
this.platform = PLATFORM;
this.root = platformRootDir;
setupEvents(events);
const appMain = path.join(this.root, 'app', 'src', 'main'); //line 65: this.root is needed, which means the 2nd parameter is needed.

but the caller at line 57 is:
var platformAPI = require(path.join(platformPath, 'cordova', 'Api'));
var platformAPIInstance = new platformAPI(); //line 57: pass nothing.

versions:
[email protected]
├── [email protected]
└── [email protected]

anyone encounter the same issue? any idea on how to solve this.
If I change the caller to pass the right info, then another place happened again. i don't know how many there will be.

By the way, the above issue is only for CLI. if I build inside android studio, then I don't have such a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant