Unable to build the APK file for android in PhoneGapBuild

Unable to build the APK file for android in PhoneGapBuild

by madhu bheemagani -
Number of replies: 7
Anyone please provide the alternate solution for building apk file for android devices.

Build Date: 2018-07-02 07:11:36 +0000
--------------------------------------------------------------------------------

PLUGIN OUTPUT

--------------------------------------------------------------------------------

Fetching plugin "cordova-plugin-camera@2.4.1" via npm

Installing "cordova-plugin-camera" at "2.4.1" for android

Fetching plugin "cordova-plugin-compat@^1.1.0" via npm

Installing "cordova-plugin-compat" at "1.2.0" for android

Subproject Path: CordovaLib

Fetching plugin "cordova-plugin-media-capture@1.4.3" via npm

Installing "cordova-plugin-media-capture" at "1.4.3" for android

Fetching plugin "cordova-plugin-file@^4.0.0" via npm

Installing "cordova-plugin-file" at "4.3.3" for android

Plugin dependency "cordova-plugin-compat@1.2.0" already fetched, using that version.

Dependent plugin "cordova-plugin-compat" already installed on android.

 

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

 

If this is a new application no changes are required.

 

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

 

  "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

 

to config.xml in order for the application to find previously stored files.

  

Plugin dependency "cordova-plugin-compat@1.2.0" already fetched, using that version.

Dependent plugin "cordova-plugin-compat" already installed on android.

Fetching plugin "cordova-plugin-device@1.1.6" via npm

Installing "cordova-plugin-device" at "1.1.6" for android

Plugin "cordova-plugin-file" already installed on android. Making it top-level.

Fetching plugin "cordova-plugin-file-transfer@1.6.3" via npm

Installing "cordova-plugin-file-transfer" at "1.6.3" for android

Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version.

Dependent plugin "cordova-plugin-file" already installed on android.

Fetching plugin "cordova-plugin-globalization@1.0.7" via npm

Installing "cordova-plugin-globalization" at "1.0.7" for android

Fetching plugin "cordova-plugin-inappbrowser@1.7.1" via npm

Installing "cordova-plugin-inappbrowser" at "1.7.1" for android

Fetching plugin "cordova-plugin-network-information@1.3.3" via npm

Installing "cordova-plugin-network-information" at "1.3.3" for android

Fetching plugin "cordova-plugin-statusbar@2.2.3" via npm

Installing "cordova-plugin-statusbar" at "2.2.3" for android

Fetching plugin "cordova-plugin-whitelist@1.3.2" via npm

Installing "cordova-plugin-whitelist" at "1.3.2" for android

 

  This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Fetching plugin "cordova-plugin-splashscreen@4.0.3" via npm

Installing "cordova-plugin-splashscreen" at "4.0.3" for android

Fetching plugin "cordova-universal-clipboard@0.1.0" via npm

Installing "cordova-universal-clipboard" at "0.1.0" for android

Fetching plugin "nl.kingsquare.cordova.background-audio@1.0.1" via npm

Installing "nl.kingsquare.cordova.background-audio" at "1.0.1" for android

Fetching plugin "phonegap-plugin-push@1.9.2" via npm

Installing "phonegap-plugin-push" at "1.9.2" for android

Subproject Path: CordovaLib

Fetching plugin "cordova-plugin-customurlscheme@4.3.0" via npm

Installing "cordova-plugin-customurlscheme" at "4.3.0" for android

Fetching plugin "ionic-plugin-keyboard@2.2.1" via npm

Installing "ionic-plugin-keyboard" at "2.2.1" for android

Fetching plugin "cordova-plugin-zip@3.1.0" via npm

Installing "cordova-plugin-zip" at "3.1.0" for android

Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version.

Dependent plugin "cordova-plugin-file" already installed on android.

Fetching plugin "cordova-plugin-local-notifications-mm" via npm

Installing "cordova-plugin-local-notifications-mm" at "1.0.6" for android

Plugin dependency "cordova-plugin-device@1.1.6" already fetched, using that version.

Dependent plugin "cordova-plugin-device" already installed on android.

Fetching plugin "cordova-plugin-app-event" via npm

Installing "cordova-plugin-app-event" at "1.2.1" for android

Subproject Path: CordovaLib

 

  Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.

  https://github.com/katzer/cordova-plugin-local-notifications#supporting

 

  Thank you!

Fetching plugin "https://github.com/Tunts/WebIntent.git" via git clone

Using shallow clone

Repository "https://github.com/Tunts/WebIntent.git" checked out to git ref "master" at "15fcb4e".

Installing "net.tunts.webintent" at "0.2.1" for android

Fetching plugin "https://github.com/ti8m/DocumentHandler.git" via git clone

Using shallow clone

Repository "https://github.com/ti8m/DocumentHandler.git" checked out to git ref "master" at "f501154".

Installing "ch.ti8m.documenthandler" at "0.2.2" for android

--------------------------------------------------------------------------------

COMPILE OUTPUT

--------------------------------------------------------------------------------

Using target=android-25

Subproject Path: CordovaLib

Running command: /project/gradlew cdvBuildDebug -b /project/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

at build_ephqw0tigc0hruebp0pkbwbs.run(/project/build.gradle:138)

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.

The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

The ProjectDependency.getProjectConfiguration() method has been deprecated and is scheduled to be removed in Gradle 4.0.

ModuleDependency.getConfiguration() has been deprecated and is scheduled to be removed in Gradle 4.0. Use ModuleDependency.getTargetConfiguration() instead.

:preBuild UP-TO-DATE

:preDebugBuild UP-TO-DATE

:checkDebugManifest

:preReleaseBuild UP-TO-DATE

:CordovaLib:preBuild UP-TO-DATE

:CordovaLib:preDebugBuild UP-TO-DATE

:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

:CordovaLib:compileDebugNdk UP-TO-DATE

:CordovaLib:compileLint

:CordovaLib:copyDebugLint UP-TO-DATE

:CordovaLib:mergeDebugShaders

:CordovaLib:compileDebugShaders

:CordovaLib:generateDebugAssets

:CordovaLib:mergeDebugAssets

:CordovaLib:mergeDebugProguardFiles

:CordovaLib:packageDebugRenderscript UP-TO-DATE

:CordovaLib:compileDebugRenderscript

:CordovaLib:generateDebugResValues

:CordovaLib:generateDebugResources

:CordovaLib:packageDebugResources

:CordovaLib:processDebugManifest

:CordovaLib:generateDebugBuildConfig

:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources

:CordovaLib:incrementalDebugJavaCompilationSafeguard

:CordovaLib:compileDebugJavaWithJavac

:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForDebug

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

:CordovaLib:mergeDebugJniLibFolders

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

:CordovaLib:bundleDebug

:CordovaLib:preReleaseBuild UP-TO-DATE

:CordovaLib:checkReleaseManifest

:CordovaLib:prepareReleaseDependencies

:CordovaLib:compileReleaseAidl

:CordovaLib:compileReleaseNdk UP-TO-DATE

:CordovaLib:copyReleaseLint UP-TO-DATE

:CordovaLib:mergeReleaseShaders

:CordovaLib:compileReleaseShaders

:CordovaLib:generateReleaseAssets

:CordovaLib:mergeReleaseAssets

:CordovaLib:mergeReleaseProguardFiles

:CordovaLib:packageReleaseRenderscript UP-TO-DATE

:CordovaLib:compileReleaseRenderscript

:CordovaLib:generateReleaseResValues

:CordovaLib:generateReleaseResources

:CordovaLib:packageReleaseResources

:CordovaLib:processReleaseManifest

:CordovaLib:generateReleaseBuildConfig

:CordovaLib:processReleaseResources

:CordovaLib:generateReleaseSources

:CordovaLib:incrementalReleaseJavaCompilationSafeguard

:CordovaLib:compileReleaseJavaWithJavac

:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processReleaseJavaRes UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease

:CordovaLib:mergeReleaseJniLibFolders

:CordovaLib:transformNative_libsWithMergeJniLibsForRelease

:CordovaLib:transformNative_libsWithSyncJniLibsForRelease

:CordovaLib:bundleRelease

:prepareAndroidArchCoreRuntime110Library

:prepareAndroidArchLifecycleLivedataCore110Library

:prepareAndroidArchLifecycleRuntime110Library

:prepareAndroidArchLifecycleViewmodel110Library

:prepareComAndroidSupportAsynclayoutinflater2800Alpha1Library

:prepareComAndroidSupportCoordinatorlayout2800Alpha1Library

:prepareComAndroidSupportCursoradapter2800Alpha1Library

:prepareComAndroidSupportCustomview2800Alpha1Library

:prepareComAndroidSupportDocumentfile2800Alpha1Library

:prepareComAndroidSupportDrawerlayout2800Alpha1Library

:prepareComAndroidSupportInterpolator2800Alpha1Library

:prepareComAndroidSupportLoader2800Alpha1Library

:prepareComAndroidSupportLocalbroadcastmanager2800Alpha1Library

:prepareComAndroidSupportPrint2800Alpha1Library

:prepareComAndroidSupportSlidingpanelayout2800Alpha1Library

:prepareComAndroidSupportSupportCompat2800Alpha1Library

:prepareComAndroidSupportSupportCoreUi2800Alpha1Library

:prepareComAndroidSupportSupportCoreUtils2800Alpha1Library

:prepareComAndroidSupportSupportFragment2800Alpha1Library

:prepareComAndroidSupportSupportMediaCompat2800Alpha1Library

:prepareComAndroidSupportSupportV132340Library

:prepareComAndroidSupportSupportV42800Alpha1Library

:prepareComAndroidSupportSwiperefreshlayout2800Alpha1Library

:prepareComAndroidSupportViewpager2800Alpha1Library

:prepareComGoogleAndroidGmsPlayServicesBase980Library

:prepareComGoogleAndroidGmsPlayServicesBasement980Library

:prepareComGoogleAndroidGmsPlayServicesGcm980Library

:prepareComGoogleAndroidGmsPlayServicesIid980Library

:prepareComGoogleAndroidGmsPlayServicesTasks980Library

:prepareMeLeolinShortcutBadger1111Library

:prepareProjectCordovaLibUnspecifiedDebugLibrary

:prepareDebugDependencies

:compileDebugAidl

:compileDebugRenderscript

:generateDebugBuildConfig

:generateDebugResValues

:generateDebugResources

:mergeDebugResources

:processDebugManifest

:processDebugResourcesERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

 

FAILED

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':processDebugResources'.

> com.android.ide.common.process.ProcessException: Failed to execute aapt

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 

BUILD FAILED

 

Total time: 4.474 secs

Command finished with error code 1: /project/gradlew cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx 2048m,-Pandroid.useDeprecatedNdk=true

Error: /project/gradlew: Command failed with exit code 1 Error output:

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

 

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Execution failed for task ':processDebugResources'.

> com.android.ide.common.process.ProcessException: Failed to execute aapt

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

  at emitTwo (events.js:106:13)

  at ChildProcess.emit (events.js:191:7)

  at maybeClose (internal/child_process.js:877:16)

  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Average of ratings: -
In reply to madhu bheemagani

Re: Unable to build the APK file for android in PhoneGapBuild

by behnaz ranjbar -
i had problem with phonegap build (online one) too, so i switched to another way, i mean building with phonegap using sdk (android studio).
Average of ratings: Useful (1)
In reply to behnaz ranjbar

Re: Unable to build the APK file for android in PhoneGapBuild

by madhu bheemagani -

Thanks for the information. Please can you provide any documentation for the building app using android studio?


Thanks in advance.

Regards

Madhu

In reply to madhu bheemagani

Re: Unable to build the APK file for android in PhoneGapBuild

by behnaz ranjbar -
your welcome, ok first there is another forum post here named "Struggling to build" that could be really useful but let me summaize the steps for you:
1.installing git and python and gcc is needed on your system (i'm not sure that it can work with or without them, but i've installed them)
2.install nvm
3.install node.js version 6.9.1(nvm install 6.9.1           nvm use 6.9.1)
4.install cordova 6.5.0 (npm install -g cordova@6.5.0)
5.install ionic 2.2.3 (npm install -g ionic@2.2.3)
6.npm install -g gulp
8.cd moodlemobile
9.npm run setup
now your project folder is ready next try to install android studio and sdk and then open the project in android studio
just take care to open ...>platforms>android in android studio
before running add these commands at the end of build.gradle
android {
    compileSdkVersion 26
    buildToolsVersion '26.0.1'
}
and then sync and run for possible errors and at the end generate the apk

Average of ratings: Useful (1)
In reply to behnaz ranjbar

Re: Unable to build the APK file for android in PhoneGapBuild

by madhu bheemagani -

Thanks for the information.

In reply to madhu bheemagani

Re: Unable to build the APK file for android in PhoneGapBuild

by Dani Palou -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi,

sorry for the delay in answering, it's been some crazy months lately.

Please use this config file for PhonegapBuild:

https://github.com/moodlehq/moodlemobile-phonegapbuild/blob/v3.5.0/config.xml

Cheers,

Dani

In reply to Dani Palou

Re: Unable to build the APK file for android in PhoneGapBuild

by madhu bheemagani -

Dear Dani,

Thanks for the providing the new conig.xml file

Regards
Madhu

In reply to madhu bheemagani

Re: Unable to build the APK file for android in PhoneGapBuild

by Anup Srv -

call me at 9919885618