Framework7 cordova build android --release error: unknown option `--release'

hello i need to build relsase apk for build it to google play
i get message error

framework7 cordova build android --release
error: unknown option `–release

I got this before. Reason was that I copy-pasted the command from a website, and that where not regular dashes but “Word-dashes”. Took me ages to find out…

You can try to just type the command. (It are two separate dashes)

Try

cd cordova
cordova build android --release

i tried it too , is wrong
because my project file in folder ‘Src’
not in cordova

i have complete my project . just stopped in upload apk to google play
if you have a time you can check my problem with teamviewer or anydesk

any idea ?? your project Framework is easy to create app , but hard to build app use in google play or appstore

How does your src related to cordova. To run cordova related commands you can run them in cordova folder, including ones to do the release

There is a lot of info on the web on how to build release APK with cordova, for example https://stackoverflow.com/questions/26449512/how-to-create-a-signed-apk-file-using-cordova-command-line-interface

1 Like
\cordova> cordova build android --release
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\Lenovo\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\Lenovo\AppData\Local\Android\Sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preReleaseBuild UP-TO-DATE
> Task :CordovaLib:checkReleaseManifest UP-TO-DATE
> Task :CordovaLib:processReleaseManifest UP-TO-DATE
> Task :app:preReleaseBuild UP-TO-DATE
> Task :CordovaLib:compileReleaseAidl NO-SOURCE
> Task :app:compileReleaseAidl NO-SOURCE
> Task :CordovaLib:packageReleaseRenderscript NO-SOURCE
> Task :app:compileReleaseRenderscript UP-TO-DATE
> Task :app:checkReleaseManifest UP-TO-DATE
> Task :app:generateReleaseBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateReleaseSources UP-TO-DATE
> Task :CordovaLib:compileReleaseRenderscript UP-TO-DATE
> Task :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
> Task :CordovaLib:generateReleaseResValues UP-TO-DATE
> Task :CordovaLib:generateReleaseResources UP-TO-DATE
> Task :CordovaLib:packageReleaseResources UP-TO-DATE
> Task :CordovaLib:generateReleaseRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateReleaseSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileRelease UP-TO-DATE
> Task :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processReleaseJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease UP-TO-DATE
> Task :app:javaPreCompileRelease UP-TO-DATE
> Task :app:mainApkListPersistenceRelease UP-TO-DATE
> Task :app:generateReleaseResValues UP-TO-DATE
> Task :app:generateReleaseResources UP-TO-DATE
> Task :app:mergeReleaseResources FAILED
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #3: Unexpected error during compile 'C:\Users\Lenovo\Documents\AndroidProject\ColorRiseF7\cordova\platforms\android\app\src\main\res\drawable-land-xxxhdpi\screen.png', attempting to stop daemon.
  This should not happen under normal circumstances, please file an issue if it does.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info
20 actionable tasks: 1 executed, 19 up-to-date
 or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s
C:\Users\Lenovo\Documents\AndroidProject\ColorRiseF7\cordova\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.3.0-5013011-windows Daemon #3: Unexpected error during compile 'C:\Users\Lenovo\Documents\AndroidProject\ColorRiseF7\cordova\platforms\android\app\src\main\res\drawable-land-xxxhdpi\screen.png', attempting to stop daemon.
  This should not happen under normal circumstances, please file an issue if it does.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 12s

thanks for everyone help me
my app now in goolge play

1 Like

can i make my app show in page of showcase of framework7 website