A general introduction to , Mobile terminal project adopts ionic+cordova To set up , The original use of window When compiling , In the installation Android studio after , and gradle, And configure the relevant variables , perform

cordova prepare android

cordova build android --release

All went well , And created apk file

But through mac Download and install Android studio after , and gradle after ,

perform cordova prepare android

A hint of Java Class already exists /platform/android Next , Unable to proceed , It's due to the use of barcodescanner and gizscanqrcode As a result of . No need to deal with it

contrast App Under the build.gradle, Find out mac It's a lot gizscanqrcode An introduction . Get rid of . And will /platform/android Of gizscanqrcode Folder 、app/src/java/com Generated gizscanqrcode dependent Java Get rid of , Otherwise, there will be ClassNotFoundError.

After removal , Re execution cordova build android --release. success