4

I'm attempting to build a cordova app to release to android devices but receiving the following error message:

"Error: No Java files found that extend CordovaActivity"

It appears that the source of the error is that build folder that is to contain the source files is not being built. That is, the files that are to be created in the folder "src" isn't generated during the build and so the following warning is returned during each build:

ls: no such file or directory: ...\platforms\android\src\io\cordova\myappedc27c*.java

That is, the directory path "..\io\cordova\myappedc27c" is not being created.

Currently running Visual Studio 2017 version 15.7 on Windows 7 Pro.

Any help is appreciated.

wrappingduke
  • 39
  • 1
  • 5

3 Answers3

4

ionic cordova platform rm android then ionic cordova platform add android@latest command solved the problem for my Ionic 3 application.

Véger Lóránd
  • 5,192
  • 2
  • 14
  • 15
4

This happened to me after renaming the default Cordova config and package names. I fixed it by doing the following:

cordova platform remove android

cordova platform add android

Substitute android for each platform you'll be using.

Porter Lyman
  • 343
  • 2
  • 10
0

I am developing an Ionic (5) app and saw this randomly pop up as well. Removing just the android platform under platforms wasn't good enough. I removed the entire platforms directory and while I was at it, also removed out-tsc, plugins and www.

Russ
  • 623
  • 8
  • 14