Help, my app generates different compilations :(

I’m working on a team project. The problem is that when compiling generates different directories.

When my partner compiles:

ionic android build

his platforms/android/ directory

but my directories are generating different

plaforms/android/ directory

Why is this happening?

Probably a different Cordova version.

Execute this in your/partner command line:

cordova --version

It’s most likely a difference in the android running environments. Often times if you have the Android 19 SDK (For example) and the required build is 14 but your partner has Android 22 installed, his will build using 22 and yours will build using 19.

android list idk

Run that command on your machine and his and report back the results.

You have to compile by using gradle and the file .apk in build/outputs/apk/android-debug.apk

Thank you all, everything is working, the problem was versions.

Can you tell us for the future reference, was it a problem with Cordova versions or Android environments?

Hi, the problem was with Cordova versions, this is the solution:

"BlueBell’s answer is right, you can do it by:

npm uninstall cordova ionic

indent preformatted text by 4 spaces

Are you planning to re-install it? If you feel something’s wrong which is causing problems then you should update npm and clean npm’s cache.

npm cache clean -f
npm install npm -g

If problems still persist, I’d suggest re-install of NPM and Node.

npm uninstall node
apt-get purge npm
apt-get install npm
npm install node -g

Let me know if you face issues in the process."

This is the source: solution cordova version

1 Like