Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhoneGap build fail - Android #240

Closed
asangadev opened this issue Oct 4, 2017 · 26 comments
Closed

PhoneGap build fail - Android #240

asangadev opened this issue Oct 4, 2017 · 26 comments

Comments

@asangadev
Copy link

asangadev commented Oct 4, 2017

Hi there,

config.xml settings:

<preference name="phonegap-version" value="cli-6.5.0" />
<engine name="android" spec="latest" />

<plugin name="cordova.plugins.diagnostic" source="npm" />
<plugin name="cordova-android-support-gradle-release" spec="^1.1.1">
    <variable name="ANDROID_SUPPORT_VERSION" value="26.0.1" />
</plugin>

I'm still getting below error:

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.238 secs
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.
/project/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

/project/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':processDebugResources'.

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


If I remove the <plugin name="cordova.plugins.diagnostic" source="npm" /> then the I can run the build process without any issues.

Could you please advise?

@dpa99c
Copy link
Owner

dpa99c commented Oct 4, 2017

This error is caused by a Gradle version mismatch. The exact cause depends on which other plugins and which version of the cordova-android platform you are using in your project, also the target SDK version. The above error indicates it's looking for a v26 resource (see here) in the Android Support Library, but is not finding it.

This plugin currently pins v25 of the Android Support Library. However, cordova-android@6.3.0 was released last week and this version targets API 26, so I will release a patch version of this plugin shortly which bumps the target version from v25 to v26 - hopefully this will resolve your error.

If you were building locally, the simplest solution would be to install cordova-android-support-gradle-release into your project, which will override the Android Support Library versions specified by plugins in their Gradle config (including this plugin) to the specified version. However, since Phonegap Build does not support hook scripts, this plugin will not work in the Phonegap Build environment.

dpa99c added a commit that referenced this issue Oct 4, 2017
…latest release version of Cordova Android platform: cordova-android@6.3.0. Relates to #240. Patch version bump: 3.6.8
@dpa99c
Copy link
Owner

dpa99c commented Oct 4, 2017

Patch version published to npm as cordova.plugins.diagnostic@3.6.8. Please give it a try.

@asangadev
Copy link
Author

asangadev commented Oct 4, 2017

You are a legend! Works perfectly fine on PhonegapBuild (Android) with:

<plugin name="cordova.plugins.diagnostic" spec="~3.6.8" />

@asangadev asangadev changed the title PhoneGap build fail PhoneGap build fail - Android Oct 4, 2017
@asangadev asangadev reopened this Oct 4, 2017
@asangadev
Copy link
Author

Hi there,

Juts a quick question. Phonegap build works perfectly fine with the v3.6.8. but not with the v3.7.0.

With v3.7.0, we are getting a build error.

Do we have to use <plugin name="cordova.plugins.diagnostic" spec="~3.6.8" /> when be build for android? Could you please advise?

@asangadev asangadev reopened this Oct 9, 2017
@dpa99c
Copy link
Owner

dpa99c commented Oct 9, 2017

Seems that one of the pull requests I accepted before publishing v3.7.0 set the Android Support Library to v25 and I didn't notice, so inadvertently reverted it back to v25. Will publish v3.7.1 patch version to set it back to v26.

@dpa99c dpa99c closed this as completed in 44169e9 Oct 9, 2017
@dpa99c
Copy link
Owner

dpa99c commented Oct 9, 2017

published to npm as @3.7.1

@asangadev
Copy link
Author

asangadev commented Oct 9, 2017

v3.7.1 works perfectly fine with the new updates. Thanks again!

@AndreVicenteW
Copy link

With the version @3.7.1 I have this error #262
How can I resolve "Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'" and "Your app uses the "prefs:root=" non-public..." at the same time?

@dpa99c
Copy link
Owner

dpa99c commented Apr 18, 2018

@AndreVicenteW Update to latest version 4.0.5

@AndreVicenteW
Copy link

AndreVicenteW commented Apr 18, 2018

With version 4.0.5 I have the error "/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15:21-54: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'."
This error is in android when I try to run in device

@dpa99c
Copy link
Owner

dpa99c commented Apr 18, 2018

You need to build using API 26 (or above) SDK: https://stackoverflow.com/a/45310170/777265

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

i am use this not resolve my error

:(
this my config file

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="com.mtech.nathealth" version="1.0.1" versionCode = "10001">
  <name>NatHealth</name>
  <description>NatHealth App</description>
  <author href="http://fikrgroup.com/" email="info@thm.com">thm projects.</author>
  <content src="index.html"/>
  <platform name="android" />


  <preference name="DisallowOverscroll" value="true"/>
  <preference name="permissions" value="none"/>
  <preference name="orientation" value="default"/>
  <preference name="target-device" value="universal"/>
  <preference name="fullscreen" value="false"/>
  <preference name="webviewbounce" value="true"/>
  <preference name="prerendered-icon" value="true"/>
  <preference name="stay-in-webview" value="false"/>
  <preference name="detect-data-types" value="true"/>
  <preference name="exit-on-suspend" value="false"/>
  <preference name="phonegap-version" value="cli-7.0.1" />

  <preference name="disable-cursor" value="false"/>
  <preference name="android-minSdkVersion" value="20"/>
  <preference name="android-installLocation" value="auto"/>
  <preference name="android-build-tool" value="gradle" />

  <plugin name="cordova-plugin-camera" source="npm" spec="~2.1.1"/>
  <plugin name="cordova-plugin-media-capture" source="npm" spec="~1.2.0"/>
  <plugin name="cordova-plugin-console" source="npm" spec="~1.0.2"/>

  <plugin name="cordova-plugin-device" source="npm" spec="~1.1.1"/>
  <plugin name="cordova-plugin-device-motion" source="npm" spec="~1.2.0"/>
  <plugin name="cordova-plugin-device-orientation" source="npm" spec="~1.0.2"/>
  <plugin name="cordova-plugin-dialogs" source="npm" spec="~1.2.0"/>
  <plugin name="cordova-plugin-file" source="npm" spec="~4.1.1"/>
  <plugin name="cordova-plugin-file-transfer" source="npm" spec="~1.5.0"/>
  <plugin name="cordova-plugin-geolocation" source="npm" />

  <plugin name="cordova.plugins.diagnostic" spec="~3.6.8" />

  <plugin name="uk.co.workingedge.phonegap.plugin.launchnavigator" source="npm" />
  <plugin name="cordova-plugin-spinner" source="npm" />
  <gap:plugin name="cordova-sms-plugin" source="npm" />
  <gap:plugin name="cordova-plugin-call-number" source="npm" />

  <plugin name="cordova-plugin-globalization" source="npm" spec="~1.0.3"/>
  <plugin name="cordova-plugin-inappbrowser" source="npm" spec="~1.3.0"/>
  <plugin name="cordova-plugin-media" source="npm" spec="~2.2.0"/>
  <plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0"/>

  <plugin name="cordova-plugin-statusbar" source="npm" spec="~2.1.2"/>
  <plugin name="cordova-plugin-vibration" source="npm" spec="~2.1.0"/>
  <plugin name="cordova-plugin-whitelist" source="npm" spec="~1.2.1"/>
  <plugin name="cordova-plugin-social-message" source="npm"/>

  <gap:plugin name="cordova-plugin-googleplayservices" source="npm" />
 
  <icon src="icon.png"/>
  <icon platform="android" qualifier="ldpi" src="res/icons/android/icon-36-ldpi.png"/>
  <icon platform="android" qualifier="mdpi" src="res/icons/android/icon-48-mdpi.png"/>
  <icon platform="android" qualifier="hdpi" src="res/icons/android/icon-72-hdpi.png"/>
  <icon platform="android" qualifier="xhdpi" src="res/icons/android/icon-96-xhdpi.png"/>
  <icon platform="android" qualifier="xxhdpi" src="res/icons/android/icon-144-xxhdpi.png"/>
  <icon platform="android" qualifier="xxxhdpi" src="res/icons/android/icon-192-xxxhdpi.png"/>
  <splash src="splash.png" />
  <splash platform="android" qualifier="ldpi" src="res/screens/android/screen-ldpi-portrait.png" />
  <splash platform="android" qualifier="mdpi" src="res/screens/android/screen-mdpi-portrait.png" />
  <splash platform="android" qualifier="hdpi" src="res/screens/android/screen-hdpi-portrait.png" />
  <splash platform="android" qualifier="xhdpi" src="res/screens/android/screen-xhdpi-portrait.png" />
  <platform name="android">
    <preference name="android-minSdkVersion" value="20" />
    <preference name="android-targetSdkVersion" value="23" />
  </platform>

  <preference name="SplashScreenDelay" value="2000" />
  <preference name="AutoHideSplashScreen" value="true" />
  <preference name="FadeSplashScreen" value="false"/>
  <preference name="SplashMaintainAspectRatio" value="true" />
  <preference name="ShowSplashScreenSpinner" value="false"/>
  <preference name="PWEnablePhoneStatePermission" value="false" />
  <allow-navigation href="*"/>
  <access origin="*"/>
  <allow-intent href="http://*/*"/>
  <allow-intent href="https://*/*"/>
  <allow-intent href="tel:*"/>
  <allow-intent href="sms:*"/>
  <allow-intent href="mailto:*"/>
  <allow-intent href="geo:*"/>
  <platform name="android">
    <allow-intent href="market:*"/>
  </platform>

</widget>

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

after few day every thing is fine :(

@dpa99c
Copy link
Owner

dpa99c commented Jun 1, 2018

@dizzlr

<plugin name="cordova.plugins.diagnostic" spec="~3.6.8" />

You are using an outdated version of this plugin - please update to the latest version

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

the latest update same problem :(
the problem happened after latest update :(

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

same problem open on phongap forms

App was building successfully before few days. No changes are made in app but today it says "App build failed" . Following is whole stack trace

capture

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

capture

@dpa99c
Copy link
Owner

dpa99c commented Jun 1, 2018

As you can see from the commit history, the latest update (v4.0.8) made fixes specifically for iOS, so has no impact on Android.

The last change made to the Android Support Library version in this plugin was made by this commit on 9 Oct 2017.

So more likely another component in your app has changed and is now conflicting with this plugin.

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

mr Dave i use only your plugin on my config file
and still build error on phonegap
here is my config now

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.mtech.nathealth" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>nathealth app</name>
    <description>
        Hello World sample application that responds to the deviceready event.
    </description>
    <author email="support@phonegap.com" href="http://phonegap.com">
        PhoneGap Team
    </author>
    <content src="index.html" />
	<platform name="android" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="android-minSdkVersion" value="14" />
	<plugin name="cordova.plugins.diagnostic" source="npm" />
    <platform name="android">
        <icon density="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="www/res/screen/android/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="www/res/screen/android/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="www/res/screen/android/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="www/res/screen/android/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="www/res/screen/android/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="www/res/screen/android/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="www/res/screen/android/drawable-port-xxxhdpi-screen.png" />
    </platform>
	<access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
</widget>

and this some screen shots

capture

capture

please check this error please :(

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

this is test project include only your plugin

https://github.com/dizzlr/TestDiagnostic-.git

you can test it on phonegap build

https://build.phonegap.com

@dpa99c
Copy link
Owner

dpa99c commented Jun 1, 2018

In your test project, you are not specifying the Phonegap Build CLI version, so it's defaulting to CLI 6.5.0 and hence building with cordova-android@6.1.0 which uses the Android API 25 compile SDK which is leading to your build failure.

If you update your test project to use CLI 7.1.0, it will build with cordova-android@6.3.0 which targets API 26 and the build will succeed:

<preference name="phonegap-version" value="cli-7.1.0" />

You can confirm this works by building the example project in Phonegap Build which uses cli-7.1.0 and builds successfully on Phonegap Build:

console output

Build Date: 2018-06-01 14:46:54 +0000
--------------------------------------------------------------------------------
PREPARE OUTPUT
--------------------------------------------------------------------------------
Generating platform-specific config.xml from defaults for android at /res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, ../platform_www] to ../assets/www
  mkdir ../assets/www/cordova-js-src
  mkdir ../assets/www/cordova-js-src/android
  copy  ../platform_www/cordova-js-src/android/nativeapiprovider.js ../assets/www/cordova-js-src/android/nativeapiprovider.js (new file)
  copy  ../platform_www/cordova-js-src/android/promptbasednativeapi.js ../assets/www/cordova-js-src/android/promptbasednativeapi.js (new file)
  copy  ../platform_www/cordova-js-src/exec.js ../assets/www/cordova-js-src/exec.js (new file)
  copy  ../platform_www/cordova-js-src/platform.js ../assets/www/cordova-js-src/platform.js (new file)
  mkdir ../assets/www/cordova-js-src/plugin
  mkdir ../assets/www/cordova-js-src/plugin/android
  copy  ../platform_www/cordova-js-src/plugin/android/app.js ../assets/www/cordova-js-src/plugin/android/app.js (new file)
  copy  ../platform_www/cordova.js ../assets/www/cordova.js (updated file)
  rmdir  ../assets/www/css (no source)
  delete ../assets/www/css/index.css (no source)
  rmdir  ../assets/www/img (no source)
  delete ../assets/www/img/cordova.png (no source)
  delete ../assets/www/img/logo.png (no source)
  copy  www/index.html ../assets/www/index.html (updated file)
  copy  www/js/index.js ../assets/www/js/index.js (updated file)
  copy  www/js/jquery-2.1.3.min.js ../assets/www/js/jquery-2.1.3.min.js (new file)
Wrote out android application name "Diagnostic plugin example" to /res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (4.0.0): 40000
Wrote out Android package name "cordova.plugins.diagnostic.example" to /src/cordova/plugins/diagnostic/example/Diagnosticpluginexample.java
This app does not have launcher icons defined
This app does not have splash screens defined
This app does not have additional resource files defined
Prepared android project successfully
--------------------------------------------------------------------------------
PLUGIN OUTPUT
--------------------------------------------------------------------------------
Fetching plugin "cordova-plugin-whitelist@*" via npm
Installing "cordova-plugin-whitelist" at "1.3.3" 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.plugins.diagnostic@*" via npm
Installing "cordova.plugins.diagnostic" at "4.0.8" for android
Subproject Path: CordovaLib
Fetching plugin "cordova-plugin-geolocation@^4.0.1" via npm
Installing "cordova-plugin-geolocation" at "4.0.1" for android
Fetching plugin "cordova-plugin-device@^2.0.1" via npm
Installing "cordova-plugin-device" at "2.0.2" for android
Fetching plugin "cordova-plugin-file@^6.0.1" via npm
Installing "cordova-plugin-file" at "6.0.1" for 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.

--------------------------------------------------------------------------------
PROJECT PROPERTIES
--------------------------------------------------------------------------------
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-26
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:support-v4:26.+
cordova.system.library.2=com.android.support:appcompat-v7:26.+
--------------------------------------------------------------------------------
COMPILE OUTPUT
--------------------------------------------------------------------------------
:wrapper

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
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_et8fe61hyfjlds4fxyz3ezcuy.run(/build.gradle:141)
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.
: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
:prepareAndroidArchLifecycleRuntime100Library
:prepareComAndroidSupportAnimatedVectorDrawable2610Library
:prepareComAndroidSupportAppcompatV72610Library
:prepareComAndroidSupportSupportCompat2610Library
:prepareComAndroidSupportSupportCoreUi2610Library
:prepareComAndroidSupportSupportCoreUtils2610Library
:prepareComAndroidSupportSupportFragment2610Library
:prepareComAndroidSupportSupportMediaCompat2610Library
:prepareComAndroidSupportSupportV42610Library
:prepareComAndroidSupportSupportVectorDrawable2610Library
:prepareOrgApacheCordovaCordovaLib630DebugLibrary
:prepareDebugDependencies
:compileDebugAidl
:compileDebugRenderscript
:generateDebugBuildConfig
:generateDebugResValues
:generateDebugResources
:mergeDebugResources
:processDebugManifest
:processDebugResources
:generateDebugSources
:incrementalDebugJavaCompilationSafeguard
:compileDebugJavaWithJavac
: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.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:compileDebugNdk UP-TO-DATE
:compileDebugSources
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:mergeDebugAssets
:transformClassesWithDexForDebug
:mergeDebugJniLibFolders
:transformNative_libsWithMergeJniLibsForDebug
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug
:validateSigningDebug
:packageDebug
:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL

Total time: 20.437 secs
Built the following apk(s): 
	/build/outputs/apk-debug.apk

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

i change the cli version but still have the same build failure

this screen shot

:(
capture

this the test app update with cli-7.1.0

https://github.com/dizzlr/TestDiagnostic-.git

@dizzlr
Copy link

dizzlr commented Jun 1, 2018

thank you ,I'm sorry to disturb you ,but this plugin toooo great and very helpful to me
this plugin was building successfully before few days :(

@dpa99c
Copy link
Owner

dpa99c commented Jun 2, 2018

The problem is your test project (https://github.com/dizzlr/TestDiagnostic-) is not correctly set up.

If you look at the build log, it fails with this error:

Error: Source path does not exist: www/res/icon/android/drawable-hdpi-icon.png

Because your config.xml references www/res/... but your resource files are located in the repo at res/....

That has nothing to do with this plugin.

console output

Build Date: 2018-06-02 09:26:46 +0000
--------------------------------------------------------------------------------
PREPARE OUTPUT
--------------------------------------------------------------------------------
Generating platform-specific config.xml from defaults for android at /res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [, ../platform_www] to ../assets/www
  copy  README.md ../assets/www/README.md (new file)
  copy  config.xml ../assets/www/config.xml (new file)
  mkdir ../assets/www/cordova-js-src
  mkdir ../assets/www/cordova-js-src/android
  copy  ../platform_www/cordova-js-src/android/nativeapiprovider.js ../assets/www/cordova-js-src/android/nativeapiprovider.js (new file)
  copy  ../platform_www/cordova-js-src/android/promptbasednativeapi.js ../assets/www/cordova-js-src/android/promptbasednativeapi.js (new file)
  copy  ../platform_www/cordova-js-src/exec.js ../assets/www/cordova-js-src/exec.js (new file)
  copy  ../platform_www/cordova-js-src/platform.js ../assets/www/cordova-js-src/platform.js (new file)
  mkdir ../assets/www/cordova-js-src/plugin
  mkdir ../assets/www/cordova-js-src/plugin/android
  copy  ../platform_www/cordova-js-src/plugin/android/app.js ../assets/www/cordova-js-src/plugin/android/app.js (new file)
  copy  ../platform_www/cordova.js ../assets/www/cordova.js (updated file)
  delete ../assets/www/img/cordova.png (no source)
  copy  img/logo.png ../assets/www/img/logo.png (updated file)
  copy  index.html ../assets/www/index.html (updated file)
  copy  js/index.js ../assets/www/js/index.js (updated file)
  mkdir ../assets/www/res
  copy  res/.pgbomit ../assets/www/res/.pgbomit (new file)
  mkdir ../assets/www/res/icon
  mkdir ../assets/www/res/icon/android
  copy  res/icon/android/drawable-hdpi-icon.png ../assets/www/res/icon/android/drawable-hdpi-icon.png (new file)
  copy  res/icon/android/drawable-ldpi-icon.png ../assets/www/res/icon/android/drawable-ldpi-icon.png (new file)
  copy  res/icon/android/drawable-mdpi-icon.png ../assets/www/res/icon/android/drawable-mdpi-icon.png (new file)
  copy  res/icon/android/drawable-xhdpi-icon.png ../assets/www/res/icon/android/drawable-xhdpi-icon.png (new file)
  copy  res/icon/android/drawable-xxhdpi-icon.png ../assets/www/res/icon/android/drawable-xxhdpi-icon.png (new file)
  copy  res/icon/android/drawable-xxxhdpi-icon.png ../assets/www/res/icon/android/drawable-xxxhdpi-icon.png (new file)
  mkdir ../assets/www/res/icon/ios
  copy  res/icon/ios/icon-40.png ../assets/www/res/icon/ios/icon-40.png (new file)
  copy  res/icon/ios/icon-40@2x.png ../assets/www/res/icon/ios/icon-40@2x.png (new file)
  copy  res/icon/ios/icon-50.png ../assets/www/res/icon/ios/icon-50.png (new file)
  copy  res/icon/ios/icon-50@2x.png ../assets/www/res/icon/ios/icon-50@2x.png (new file)
  copy  res/icon/ios/icon-60.png ../assets/www/res/icon/ios/icon-60.png (new file)
  copy  res/icon/ios/icon-60@2x.png ../assets/www/res/icon/ios/icon-60@2x.png (new file)
  copy  res/icon/ios/icon-60@3x.png ../assets/www/res/icon/ios/icon-60@3x.png (new file)
  copy  res/icon/ios/icon-72.png ../assets/www/res/icon/ios/icon-72.png (new file)
  copy  res/icon/ios/icon-72@2x.png ../assets/www/res/icon/ios/icon-72@2x.png (new file)
  copy  res/icon/ios/icon-76.png ../assets/www/res/icon/ios/icon-76.png (new file)
  copy  res/icon/ios/icon-76@2x.png ../assets/www/res/icon/ios/icon-76@2x.png (new file)
  copy  res/icon/ios/icon-small.png ../assets/www/res/icon/ios/icon-small.png (new file)
  copy  res/icon/ios/icon-small@2x.png ../assets/www/res/icon/ios/icon-small@2x.png (new file)
  copy  res/icon/ios/icon-small@3x.png ../assets/www/res/icon/ios/icon-small@3x.png (new file)
  copy  res/icon/ios/icon.png ../assets/www/res/icon/ios/icon.png (new file)
  copy  res/icon/ios/icon@2x.png ../assets/www/res/icon/ios/icon@2x.png (new file)
  mkdir ../assets/www/res/icon/windows
  copy  res/icon/windows/Square150x150Logo.scale-100.png ../assets/www/res/icon/windows/Square150x150Logo.scale-100.png (new file)
  copy  res/icon/windows/Square150x150Logo.scale-240.png ../assets/www/res/icon/windows/Square150x150Logo.scale-240.png (new file)
  copy  res/icon/windows/Square30x30Logo.scale-100.png ../assets/www/res/icon/windows/Square30x30Logo.scale-100.png (new file)
  copy  res/icon/windows/Square310x310Logo.scale-100.png ../assets/www/res/icon/windows/Square310x310Logo.scale-100.png (new file)
  copy  res/icon/windows/Square44x44Logo.scale-100.png ../assets/www/res/icon/windows/Square44x44Logo.scale-100.png (new file)
  copy  res/icon/windows/Square44x44Logo.scale-240.png ../assets/www/res/icon/windows/Square44x44Logo.scale-240.png (new file)
  copy  res/icon/windows/Square70x70Logo.scale-100.png ../assets/www/res/icon/windows/Square70x70Logo.scale-100.png (new file)
  copy  res/icon/windows/Square71x71Logo.scale-100.png ../assets/www/res/icon/windows/Square71x71Logo.scale-100.png (new file)
  copy  res/icon/windows/Square71x71Logo.scale-240.png ../assets/www/res/icon/windows/Square71x71Logo.scale-240.png (new file)
  copy  res/icon/windows/StoreLogo.scale-100.png ../assets/www/res/icon/windows/StoreLogo.scale-100.png (new file)
  copy  res/icon/windows/StoreLogo.scale-240.png ../assets/www/res/icon/windows/StoreLogo.scale-240.png (new file)
  copy  res/icon/windows/Wide310x150Logo.scale-100.png ../assets/www/res/icon/windows/Wide310x150Logo.scale-100.png (new file)
  copy  res/icon/windows/Wide310x150Logo.scale-240.png ../assets/www/res/icon/windows/Wide310x150Logo.scale-240.png (new file)
  mkdir ../assets/www/res/icon/wp8
  copy  res/icon/wp8/ApplicationIcon.png ../assets/www/res/icon/wp8/ApplicationIcon.png (new file)
  copy  res/icon/wp8/Background.png ../assets/www/res/icon/wp8/Background.png (new file)
  mkdir ../assets/www/res/screen
  mkdir ../assets/www/res/screen/android
  copy  res/screen/android/drawable-land-hdpi-screen.png ../assets/www/res/screen/android/drawable-land-hdpi-screen.png (new file)
  copy  res/screen/android/drawable-land-ldpi-screen.png ../assets/www/res/screen/android/drawable-land-ldpi-screen.png (new file)
  copy  res/screen/android/drawable-land-mdpi-screen.png ../assets/www/res/screen/android/drawable-land-mdpi-screen.png (new file)
  copy  res/screen/android/drawable-land-xhdpi-screen.png ../assets/www/res/screen/android/drawable-land-xhdpi-screen.png (new file)
  copy  res/screen/android/drawable-land-xxhdpi-screen.png ../assets/www/res/screen/android/drawable-land-xxhdpi-screen.png (new file)
  copy  res/screen/android/drawable-land-xxxhdpi-screen.png ../assets/www/res/screen/android/drawable-land-xxxhdpi-screen.png (new file)
  copy  res/screen/android/drawable-port-hdpi-screen.png ../assets/www/res/screen/android/drawable-port-hdpi-screen.png (new file)
  copy  res/screen/android/drawable-port-ldpi-screen.png ../assets/www/res/screen/android/drawable-port-ldpi-screen.png (new file)
  copy  res/screen/android/drawable-port-mdpi-screen.png ../assets/www/res/screen/android/drawable-port-mdpi-screen.png (new file)
  copy  res/screen/android/drawable-port-xhdpi-screen.png ../assets/www/res/screen/android/drawable-port-xhdpi-screen.png (new file)
  copy  res/screen/android/drawable-port-xxhdpi-screen.png ../assets/www/res/screen/android/drawable-port-xxhdpi-screen.png (new file)
  copy  res/screen/android/drawable-port-xxxhdpi-screen.png ../assets/www/res/screen/android/drawable-port-xxxhdpi-screen.png (new file)
  mkdir ../assets/www/res/screen/ios
  copy  res/screen/ios/Default-568h@2x~iphone.png ../assets/www/res/screen/ios/Default-568h@2x~iphone.png (new file)
  copy  res/screen/ios/Default-667h.png ../assets/www/res/screen/ios/Default-667h.png (new file)
  copy  res/screen/ios/Default-736h.png ../assets/www/res/screen/ios/Default-736h.png (new file)
  copy  res/screen/ios/Default-Landscape-736h.png ../assets/www/res/screen/ios/Default-Landscape-736h.png (new file)
  copy  res/screen/ios/Default-Landscape@2x~ipad.png ../assets/www/res/screen/ios/Default-Landscape@2x~ipad.png (new file)
  copy  res/screen/ios/Default-Landscape~ipad.png ../assets/www/res/screen/ios/Default-Landscape~ipad.png (new file)
  copy  res/screen/ios/Default-Portrait@2x~ipad.png ../assets/www/res/screen/ios/Default-Portrait@2x~ipad.png (new file)
  copy  res/screen/ios/Default-Portrait~ipad.png ../assets/www/res/screen/ios/Default-Portrait~ipad.png (new file)
  copy  res/screen/ios/Default@2x~iphone.png ../assets/www/res/screen/ios/Default@2x~iphone.png (new file)
  copy  res/screen/ios/Default~iphone.png ../assets/www/res/screen/ios/Default~iphone.png (new file)
  mkdir ../assets/www/res/screen/windows
  copy  res/screen/windows/SplashScreen.scale-100.png ../assets/www/res/screen/windows/SplashScreen.scale-100.png (new file)
  copy  res/screen/windows/SplashScreenPhone.scale-240.png ../assets/www/res/screen/windows/SplashScreenPhone.scale-240.png (new file)
  mkdir ../assets/www/res/screen/wp8
  copy  res/screen/wp8/screen-portrait.jpg ../assets/www/res/screen/wp8/screen-portrait.jpg (new file)
  mkdir ../assets/www/spec
  copy  spec.html ../assets/www/spec.html (new file)
  copy  spec/helper.js ../assets/www/spec/helper.js (new file)
  copy  spec/index.js ../assets/www/spec/index.js (new file)
  mkdir ../assets/www/spec/lib
  mkdir ../assets/www/spec/lib/jasmine-1.2.0
  copy  spec/lib/jasmine-1.2.0/MIT.LICENSE ../assets/www/spec/lib/jasmine-1.2.0/MIT.LICENSE (new file)
  copy  spec/lib/jasmine-1.2.0/jasmine-html.js ../assets/www/spec/lib/jasmine-1.2.0/jasmine-html.js (new file)
  copy  spec/lib/jasmine-1.2.0/jasmine.css ../assets/www/spec/lib/jasmine-1.2.0/jasmine.css (new file)
  copy  spec/lib/jasmine-1.2.0/jasmine.js ../assets/www/spec/lib/jasmine-1.2.0/jasmine.js (new file)
Wrote out android application name "nathealth app" to /res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000
Wrote out Android package name "com.mtech.nathealth" to /src/com/mtech/nathealth/nathealthapp.java
Updating icons at ../res
Error: Source path does not exist: www/res/icon/android/drawable-hdpi-icon.png
    at updatePathInternal (/cordova/node_modules/cordova-common/src/FileUpdater.js:145:19)
    at /cordova/node_modules/cordova-common/src/FileUpdater.js:223:19
    at Array.forEach (native)
    at Object.updatePaths (/cordova/node_modules/cordova-common/src/FileUpdater.js:221:33)
    at updateIcons (/cordova/lib/prepare.js:387:17)
    at /cordova/lib/prepare.js:49:9
    at _fulfilled (/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/cordova/node_modules/q/q.js:816:13)
    at /cordova/node_modules/q/q.js:624:44

@dizzlr
Copy link

dizzlr commented Jun 2, 2018

mr dave many thanks to you i fix icons path and change cli version evry thing is fine now :)
you are great man :)

@dizzlr
Copy link

dizzlr commented Jun 2, 2018

this two plugins made conflict with diagnostic plugin
<gap:plugin name="cordova-plugin-android-support-v4" source="npm" />
<gap:plugin name="cordova-plugin-googleplayservices" source="npm" />
i hope this help someone else :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants