Beta 7 capacitor can't add android on new framework7 project

Wappler 6 Beta 7
W10
Capacitor 5.3.0

Starting a new project with framework 7 with:

Checking NodeJS installation and version...

v18.16.0

NodeJS is correctly installed.

Checking Capacitor installation and version...


5.3.0
Capacitor is correctly installed.

System check successful! 

Try to add android to the project and:

npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: wappler_mobile_app@1.0.0
npm ERR! Found: @capacitor/core@4.8.1
npm ERR! node_modules/@capacitor/core
npm ERR!   @capacitor/core@"^4.6.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @capacitor/core@"^5.3.0" from @capacitor/android@5.3.0
npm ERR! node_modules/@capacitor/android
npm ERR!   @capacitor/android@"^5.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
[warn] The bundledWebRuntime configuration option has been deprecated. Please, use a bundler to bundle Capacitor and its
       plugins.
[error] Could not find the android platform.
        You must install it in your project first, e.g. w/ npm install @capacitor/android
Error adding android to your project!

Also, is the package.json correct?

{
  "name": "wappler_mobile_app",
  "version": "1.0.0",
  "dependencies": {
    "@capacitor/core": "^4.6.0",
    "@capacitor/android": "^5.0.0"
  },
  "devDependencies": {
    "@capacitor/cli": "^5.3.0"
  }
}

Plus, the html is calling a capacitor.js wich don’t exists (also on stable version) but found no problem with that.

<script src="capacitor.js"></script>

PS: I tried to manually edit the package.json but the error persists:

Put both core and Android package versions to 4.6.0 in your package.json then run the Update command from the bottom toolbar and choose to update and migrate.

Seems it was half done before.

But we have 3 problems there:

  1. We have automatically installing 5.3.0 when we start a project
Checking Capacitor installation and version...


5.3.0
Capacitor is correctly installed.
  1. Clicking the update button updates the web platform (since android is not installed), but the 3 versions stills on 4.6.0
  2. On clicking Add android, it automatically changes to:
{
  "name": "wappler_mobile_app",
  "version": "1.0.0",
  "dependencies": {
    "@capacitor/core": "^4.6.0",
    "@capacitor/android": "^5.0.0"
  },
  "devDependencies": {
    "@capacitor/cli": "^4.6.0"
  }
}

So the workaround see that is:

  1. Changing manually the 2 package version to: 5.3.0 and run npm install @capacitor/android
  2. Having the three packages on 5.3.0 click on Add android.

found the problem, for new Capacitor Projects we still had the old version - will fix it in the next update

1 Like

Fixed in the latest beta.

This topic was automatically closed after 23 hours. New replies are no longer allowed.