dpa99c / cordova-android-support-gradle-release Goto Github PK
View Code? Open in Web Editor NEWCordova/Phonegap plugin to align various versions of the Android Support libraries specified by other plugins to a specific version
Cordova/Phonegap plugin to align various versions of the Android Support libraries specified by other plugins to a specific version
Hi,
path is undefined in after-prepare / before-prepare in:
function getCordovaAndroidVersion(){
var testPath = path.join(process.cwd(), 'platforms/android/app/src');
return fs.existsSync(testPath) ? V7 : V6;
}
try {
var fs = require('fs');
var path = require('path');
var parser = require('xml2js');
} catch (e) {
throw("Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: " + e.toString());
}
should probably
try {
fs = require('fs');
path = require('path');
parser = require('xml2js');
} catch (e) {
throw("Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: " + e.toString());
}
br robbterr
As the tittle says.
Since I also use phonegap build my config.xml must be located in the www folder.
I am using this plugin in my Ionic 1 project. But after downloading new Android studio version and new Gradle 5.0 I am not able to build to android platform
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 25.+
+-----------------------------------------------------------------
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_8bddpmbf9485azn0fyk7fap16.run(D:\Hatem\mf\platforms\android\build.gradle:139)
So I think you should change your base code according to Gradle 5.0 or give a solution without downgrading Gradle version
I'm submitting a ... (check one with "x"):
Current behavior:
In docu wos written, that we should do so:
Therefore if you're installing with cordova@6, you'll need to explicitly specify the --fetch option:
$ cordova plugin add cordova-android-support-gradle-release --fetch
But this is not correct, because on cordova v6.x I need explicit use --save
parameter, to save VARIABLE into config.xml
. Without this state, plugin can not use custom version, and replace on my system with v27.+
Expected behavior:
if plugin should be install via --fetch
, then plugin should not use value from config.xml
Environment information
cordova -v
6.5.0
cordova platform ls
Installed platforms:
android 6.3.0
ios 4.5.3
cordova plugin ls
cordova-android-support-gradle-release 1.4.4 "cordova-android-support-gradle-release"
cordova-custom-config 5.0.2 "cordova-custom-config"
cordova-plugin-android-fingerprint-auth 1.4.4 "FingerprintAuth"
cordova-plugin-android-permissions 0.10.0 "Permissions"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-ignore-lint-translation 0.0.1 "cordova-plugin-ignore-lint-translation"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
Android build issue:
node -v
v10.6.0
ls platforms/android/.gradle
4.4
android:targetSdkVersion
in AndroidManifest.xml
android:minSdkVersion="19" android:targetSdkVersion="26"
sdkmanager --list | sed -e '/Available Packages/q'
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
add-ons;addon-google_apis-google-19 | 20.0.0 | Google APIs, Android 19, rev 20 | add-ons/addon-google_apis-google-19/
add-ons;addon-google_apis-google-23 | 1.0.0 | Google APIs, Android 23 | add-ons/addon-google_apis-google-23/
add-ons;addon-google_apis-google-24 | 1.0.0 | Google APIs, Android 24 | add-ons/addon-google_apis-google-24/
build-tools;25.0.3 | 25.0.3 | Android SDK Build-Tools 25.0.3 | build-tools/25.0.3/
build-tools;26.0.2 | 26.0.2 | Android SDK Build-Tools 26.0.2 | build-tools/26.0.2/
build-tools;27.0.3 | 27.0.3 | Android SDK Build-Tools 27.0.3 | build-tools/27.0.3/
docs | 1 | Documentation for Android SDK | docs/
emulator | 27.2.9 | Android Emulator | emulator/
extras;android;gapid | 1.0.3 | GPU Debugging tools, rev 1.0.3 | extras/android/gapid/
extras;android;m2repository | 47.0.0 | Android Support Repository, rev 47 | extras/android/m2repository/
extras;android;support | 23.2.1 | Android Support Library, rev 23.2.1 | extras/android/support/
extras;google;google_play_services | 49.0.0 | Google Play services, rev 49 | extras/google/google_play_services/
extras;google;instantapps | 1.3.0 | Instant Apps Development SDK, rev 1.3 | extras/google/instantapps/
extras;google;m2repository | 58.0.0 | Google Repository, rev 58 | extras/google/m2repository/
extras;google;market_apk_expansion | 1.0.0 | Google Play APK Expansion library | extras/google/market_apk_expansion/
extras;google;market_licensing | 1.0.0 | Google Play Licensing Library | extras/google/market_licensing/
extras;google;play_billing | 5.0.0 | Google Play Billing Library, rev 5 | extras/google/play_billing/
extras;google;webdriver | 2.0.0 | Google Web Driver, rev 2 | extras/google/webdriver/
extras;intel;Hardware_Accelerated_Execution_Manager | 7.2.0 | Intel x86 Emulator Accelerator (HAXM installer) | extras/intel/Hardware_Accelerated_Execution_Manager/
ndk-bundle | 17.1.4828580 | NDK | ndk-bundle/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 28.0.0 | Android SDK Platform-Tools | platform-tools/
platforms;android-17 | 3 | Android SDK Platform 17, rev 3 | platforms/android-17/
platforms;android-19 | 4 | Android SDK Platform 19, rev 4 | platforms/android-19/
platforms;android-20 | 2 | Android SDK Platform 20, rev 2 | platforms/android-20/
platforms;android-21 | 2 | Android SDK Platform 21, rev 2 | platforms/android-21/
platforms;android-22 | 2 | Android SDK Platform 22, rev 2 | platforms/android-22/
platforms;android-23 | 3 | Android SDK Platform 23, rev 3 | platforms/android-23/
platforms;android-24 | 2 | Android SDK Platform 24, rev 2 | platforms/android-24/
platforms;android-25 | 3 | Android SDK Platform 25, rev 3 | platforms/android-25/
platforms;android-26 | 2 | Android SDK Platform 26, rev 2 | platforms/android-26/
platforms;android-27 | 3 | Android SDK Platform 27, rev 3 | platforms/android-27/
platforms;android-28 | 4 | Android SDK Platform 28, rev 4 | platforms/android-28/
platforms;android-N | 3 | Android SDK Platform N, rev 3 | platforms/android-N/
platforms;android-P | 3 | Android SDK Platform P, rev 3 | platforms/android-P/
sources;android-23 | 1 | Sources for Android 23 | sources/android-23/
system-images;android-28;google_apis;x86 | 4 | Google APIs Intel x86 Atom System Image | system-images/android-28/google_apis/x86/
tools | 26.1.1 | Android SDK Tools | tools/
com.android.support:multidex
doesn't use the version other ones in com.android.support
uses. Therefore, when you specify ANDROID_SUPPORT_VERSION
to say 26.+
, it will try to use com.android.support:multidex:26.+
which doesn't exist as the available version of com.android.support:multidex
are 1.0.0
, 1.0.1
, 1.0.2
at the moment.
Thanks!
I'm submitting:
Current behavior:
I have a cordova project, I want to upgrade android platform to latest version, which is 7.1.0, but when I run cordova platform remove android and then cordova platform add [email protected] I get this error
Failed to install 'cordova-android-support-gradle-release': Error: ENOENT: no such file or directory, open '/Users/abdu/Downloads/deltasecurity/platforms/android/AndroidManifest.xml'
Expected behavior:
When I run cordova platform remove android then cordova platform add [email protected] the operation should finish without errors
Steps to reproduce:
Try to remove android platform then add android platform 7.1.0
Environment information
Android build issue:
ls platforms/android/.gradle
not found at this path
gradle -v
4.7android:targetSdkVersion
in AndroidManifest.xml
(file missing)sdkmanager --list | sed -e '/Available Packages/q'
(command not found)Console output
Using cordova-fetch for [email protected]
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: fr.delta2s.mitesis
Name: Itesis
Activity: MainActivity
Android target: android-27
Subproject Path: CordovaLib
Subproject Path: app
Android project created with [email protected]
Android Studio project detected
Android Studio project detected
Installing "com.phonegap.plugins.PushPlugin" for android
Subproject Path: CordovaLib
Subproject Path: app
Installing "cordova-android-support-gradle-release" for android
Failed to install 'cordova-android-support-gradle-release': Error: ENOENT: no such file or directory, open '/Users/abdu/Downloads/deltasecurity/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/lib/AndroidProject.js:99:12)
at Api.addPlugin (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/Api.js:223:57)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
(node:47898) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/Users/abdu/Downloads/deltasecurity/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/lib/AndroidProject.js:99:12)
at Api.addPlugin (/Users/abdu/Downloads/deltasecurity/platforms/android/cordova/Api.js:223:57)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:816:30)
(node:47898) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:47898) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
cordova -v 8.0.0
ionic 3
i just update cordova-android from 6.3.0 to 7.0.0 and remove platform and then add it again.
getting these error while build the app.
cordova-android-play-services-gradle-release: Android platform: cordova-android@7
cordova-android-play-services-gradle-release: No custom version found in config.xml - using plugin default
(node:5432) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object
I'm submitting a ... (check one with "x"):
Current behavior:
When building my app with this plugin I receive the following warning in the console:
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Which leads to when opening the app with Android studio that I get an build error and I need to manually click in Android studio "refactor to not use compile".
Would be nice if this plugin doesn't use compile anymore.
According to http://d.android.com/r/tools/update-dependency-configurations.html this is the best practice.
Expected behavior:
No exception.
Steps to reproduce:
Add this plugin as dependency to starter kit cordova app.
Environment information
8.0.0
Installed platforms:
android 8.0.0
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
cordova-android-support-gradle-release 2.0.1 "cordova-android-support-gradle-release"
cordova-clipboard 1.2.1 "Clipboard"
cordova-plugin-add-swift-support 1.7.1 "AddSwiftSupport"
cordova-plugin-advanced-http 2.0.1 "Advanced HTTP plugin"
cordova-plugin-aes256-encryption 1.2.0 "AES256"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-cocoapod-support 1.6.0 "Cordova CocoaPods Dependency Support"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-filechooser 1.0.1 "File Chooser"
cordova-plugin-filepath 1.4.2 "cordova-plugin-filepath"
cordova-plugin-filepicker 1.1.5 "File Picker"
cordova-plugin-ionic-webview 2.3.1 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.3 "LocalNotification"
cordova-plugin-media-capture 3.0.2 "Capture"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
cordova-plugin-secure-storage 3.0.1 "SecureStorage"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-support-google-services 1.3.1 "cordova-support-google-services"
ionic-plugin-deeplinks 1.0.17 "Ionic Deeplink Plugin"
komed-cordova-plugin-ionic-keyboard 2.1.2 "komed-cordova-plugin-ionic-keyboard"
komed-cordova-plugin-twiliovoice 2.5.0 "TwilioVoice"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"
10.14.3
Runtime issue
Android build issue:
v8.13.0
4.10.1 5.2.1 buildOutputCleanup vcs-1
21
If using an Ionic Native Typescript wrapper for this plugin:
Ionic:
ionic (Ionic CLI) : 4.11.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.3
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-webview 2.3.1, (and 26 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/borntsch/Library/Android/sdk)
ios-deploy : 1.9.2
ios-sim : 7.0.0
NodeJS : v8.13.0 (/Users/borntsch/.nvm/versions/node/v8.13.0/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
Related code:
insert any relevant code here such as plugin API calls / input parameters
Console output
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to /Users/borntsch/Documents/komed/komed-frontend/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to /Users/borntsch/Documents/komed/komed-frontend/platforms/android/cordova-android-support-gradle-release/frontend-cordova-android-support-gradle-release.gradle
Discovered plugin "cordova-support-google-services" in config.xml. Adding it to the project
Plugin "cordova-support-google-services" already installed on android.
Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes
cordova-android-support-gradle-release: Android platform: V7+
cordova-android-support-gradle-release: Wrote custom version '27.+' to /Users/borntsch/Documents/komed/komed-frontend/platforms/android/app/build.gradle
cordova-android-support-gradle-release: Wrote custom version '27.+' to /Users/borntsch/Documents/komed/komed-frontend/platforms/android/cordova-android-support-gradle-release/frontend-cordova-android-support-gradle-release.gradle
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/borntsch/Library/Android/sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Configure project :app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
+-----------------------------------------------------------------
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest UP-TO-DATE
> Task :CordovaLib:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
> Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> Task :CordovaLib:generateDebugResValues UP-TO-DATE
> Task :CordovaLib:generateDebugResources UP-TO-DATE
> Task :CordovaLib:packageDebugResources UP-TO-DATE
> Task :CordovaLib:generateDebugRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateDebugSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
> Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:processDebugGoogleServices
Parsing json file: /Users/borntsch/Documents/komed/komed-frontend/platforms/android/app/google-services.json
> Task :app:mergeDebugResources
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest
> Task :app:processDebugResources
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugNdk NO-SOURCE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:mergeDebugShaders UP-TO-DATE
> Task :CordovaLib:compileDebugShaders UP-TO-DATE
> Task :CordovaLib:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:packageDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:signingConfigWriterDebug UP-TO-DATE
> Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:compileDebugNdk NO-SOURCE
> Task :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
> Task :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
> Task :app:packageDebug
> Task :app:assembleDebug
> Task :app:cdvBuildDebug
BUILD SUCCESSFUL in 4s
43 actionable tasks: 6 executed, 37 up-to-date
Built the following apk(s):
/Users/borntsch/Documents/komed/komed-frontend/platforms/android/app/build/outputs/apk/debug/app-debug.apk
โจ Done in 63.30s.
Cannot read property 'length' of undefined
<npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
cordova run android
Running command: /home/diwakar/ws/profitGuruMAPP/hooks/after_prepare/010_add_platform_class.js /home/diwakar/ws/profitGuruMAPP
ANDROID_HOME=/usr/lib/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
Starting a Gradle Daemon (subsequent builds will be faster)
null
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_8fawcafcgpbn8kv385emc80ce.run(/home/diwakar/ws/profitGuruMAPP/platforms/android/build.gradle:139)
org.xwalk:xwalk_core_library:23+
java.net.UnknownHostException: dl.google.com
Failed to connect to host: https://dl.google.com/android/repository/addons_list-3.xml
Failed to connect to host: https://dl.google.com/android/repository/addons_list-2.xml
Failed to connect to host: https://dl.google.com/android/repository/addons_list-1.xml
Failed to download any source lists!
FAILURE: Build failed with an exception.
Failed to find Platform SDK with path: platforms;android-25
BUILD FAILED
Total time: 38.521 secs
(node:14798) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/diwakar/ws/profitGuruMAPP/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
// Paste any relevant JS/native console output here
Other information:
I'm submitting a ... (check one with "x"):
Current behavior:
If I add your plugin to a existing cordova 9 project I got the following error:
EXCEPTION: No plugins found. Run 'cordova plugin save' in order to save your plugins to your config.xml-file
.
Cordova 9 do not require to add the plugin to the config.xml. But you parsing the config.xml
Expected behavior:
For cordova 9 parse the package.json to get the 'ANDROID_SUPPORT_VERSION' variable.
Steps to reproduce:
cordova platform add
Environment information
cordova -v
9.0.0 ([email protected])
Installed platforms:
android 8.0.0
Available platforms:
browser ^6.0.0
electron ^1.0.0
ios ^5.0.0
osx ^5.0.0
windows ^7.0.0
cordova-android-play-services-gradle-release 2.1.0 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 2.1.0 "cordova-android-support-gradle-release"
es6-promise-plugin 4.2.2 "Promise"
Mac OSX mojave
I'm submitting a ...:
Current behavior:
I have a first error in my build com.android.ide.common.process.ProcessException: Failed to execute aapt
, look above about error console.
FAILED
FAILURE: Build failed with an exception.
com.android.ide.common.process.ProcessException: Failed to execute aapt
BUILD FAILED
Total time: 21.335 secs
Error: my-path/efn-app/cordova-build/platforms/android/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.
my-pathcordova-build/platforms/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7:41-73: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius'). Failed to generate resource table for split ''
my-path/cordova-build/platforms/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: Error: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
FAILURE: Build failed with an exception.
com.android.ide.common.process.ProcessException: Failed to execute aapt
So, I decide to install this plugin, look Related code
section, but I have another error look Console output
section
Environment information
6.5.0
android 6.3.0
com.batch.cordova 1.7.4 "Batch"
cordova-android-support-gradle-release 1.2.1 "cordova-android-support-gradle-release"
cordova-custom-config 5.0.2 "cordova-custom-config"
cordova-plugin-background-fetch 5.3.0 "CDVBackgroundFetch"
cordova-plugin-disable-bitcode 1.3.2 "DisableBitcode"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ios-non-exempt-encryption 1.0.0 "ITSAppUsesNonExemptEncryption false"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin
Android build issue:
8.10.0
I have 3.3 and 4.1 directory
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="26"/>l
Related code:
In config.xml :
<plugin name="cordova-android-support-gradle-release" source="npm" spec="~1.2.0">
<variable name="ANDROID_SUPPORT_VERSION" value="26.+" />
</plugin>
Console output
FAILURE: Build failed with an exception.
Error: more than one library with package name 'com.google.android.gms.license'
BUILD FAILED
Total time: 9.036 secs
Error: my-path/cordova-build/platforms/android/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.
FAILURE: Build failed with an exception.
Error: more than one library with package name 'com.google.android.gms.license'
I see that semver version used ( dependancy) is 5.1.0 which is from Nov 2015. Do you have any plan to upgrade to 5.6.0 from Oct 2018
Thanks
Modi
[email protected]
works fine with [email protected]
.
But using [email protected]
and [email protected]
returns in an error when building the app:
/platforms/android/build/intermediates/res/merged/debug/values-v26/values-v26.xml:15: error: Error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
Just a question.
When starting a new project is it better to load this plugin first before any other plugins so it knows as new plugins come in what the preferred SDK support is....or can it be added at any time and does not matter?
After install this plugin, got this error.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define
Lcom/google/android/gms/iid/zzc;
One other problem today ;)
With Cordova CLI 7.1.1, when i type "cordova run android", i obtain :
Error: cordova-android-support-gradle-release: Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: Cannot find module 'xml2js'
When i use "cordova compile android", the apk is generated without issue.
I want to upgrade to the latest cordova android and plugin.
I have a problem with the cordova-android-support-gradle-release.
My environment :
"com.bez4pieci.cookies": "~0.0.1",
"cordova-android": "^7.0.0",
"cordova-android-support-gradle-release": "^1.1.5",
"cordova-browser": "^4.1.0",
"cordova-ios": "^4.5.3",
"cordova-open-native-settings": "^1.4.1",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-clipboard2": "^0.1.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-config-ios": "0.0.1",
"cordova-plugin-device": "^2.0.1",
"cordova-plugin-dialogs": "^2.0.1",
"cordova-plugin-file": "^5.0.0",
"cordova-plugin-file-opener2": "^2.0.19",
"cordova-plugin-file-transfer": "^1.7.0",
"cordova-plugin-inappbrowser": "^2.0.1",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-statusbar": "^2.4.1",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.2.1",
"cordova.plugins.diagnostic": "^3.9.1",
"es6-promise-plugin": "^4.1.0",
"phonegap-plugin-barcodescanner": "^7.0.1"
ANDROID_HOME=/Users/pomauguet/android-sdks
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home
Reading build config file: /Users/pomauguet/workspace/impots/trunk/impots-gouv/build.json
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: compileSdkVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:456)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:590)
at com.android.build.gradle.BasePlugin.lambda$null$3(BasePlugin.java:555)
FAILURE: Build failed with an exception.
* Where:
Script '/Users/pomauguet/workspace/impots/trunk/impots-gouv/platforms/android/cordova-android-support-gradle-release/android-cordova-android-support-gradle-release.gradle' line: 11
* What went wrong:
A problem occurred evaluating script.
> Could not read script '/Users/pomauguet/workspace/impots/trunk/impots-gouv/platforms/android/app/cordova-android-support-gradle-release/properties.gradle' as it does not exist.
BUILD FAILED in 1s
(node:9783) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/pomauguet/workspace/impots/trunk/impots-gouv/platforms/android/gradlew: Command failed with exit code 1 Error output:
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: compileSdkVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:456)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:590)
I suppose this problem is in relation with the decision of reorganizing the source code since Cordova Android 7.0.0 (https://cordova.apache.org/announcements/2017/12/04/cordova-android-7.0.0.html).
After test with Android engine 6.4.0, everything work fine. So this is indeed a problem with 7.0.0.
Using "requireCordovaModule" to load non-cordova module "xxx" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
Hi!
I'm using both of your plugins: cordova-android-play-services-gradle-release
and cordova-android-support-gradle-release
under [email protected]
The moment I install the cordova-android-support-gradle-release
plugin, the build.gradle breaks. There's one }
too much.
If I install cordova-android-play-services-gradle-release
only everything works as expected.
error: https://paste.xinu.at/VnPYs4/
full build.gradle: https://paste.xinu.at/Ek6/#n331
I have a recurrent problem when the platforms directory is gone.
When i use "cordova prepare android", i got :
Discovered platform "android@^6.3.0" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-android@^6.3.0
cordova-android-support-gradle-release ANDROID_SUPPORT_VERSION: 26.+
Error: ANDROID_SUPPORT_VERSION is not defined
My package.json and config.xml are good, it seems :
package.json
"cordova": {
"plugins": {
"cordova-plugin-app-version": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-network-information": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-dialogs": {},
"com.bez4pieci.cookies": {},
"cordova-plugin-clipboard2": {},
"cordova-open-native-settings": {},
"cordova-plugin-config-ios": {},
"cordova.plugins.diagnostic": {},
"phonegap-plugin-barcodescanner": {
"CAMERA_USAGE_DESCRIPTION": "Need permission"
},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "26.+"
},
config.xml
<plugin name="cordova-android-support-gradle-release" spec="^1.1.4">
<variable name="ANDROID_SUPPORT_VERSION" value="26.+" />
</plugin>
Not certain of the impact of this, but thought I would bring it to your attention:
BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
+-----------------------------------------------------------------
| cordova-android-support-gradle-release: 26.+
+-----------------------------------------------------------------
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
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_2fkom8pjh5fl5uoxdxgu527kh.run(C:\Users\rolin\dev\myApp\platforms\android\app\build.gradle:147)
I'm submitting a ... (check one with "x"):
Current behavior:
Expected behavior:
Steps to reproduce:
Environment information
cordova -v
cordova platform ls
cordova plugin ls
sw_vers
winver
Runtime issue
Android build issue:
node -v
ls platforms/android/.gradle
android:targetSdkVersion
in AndroidManifest.xml
sdkmanager --list | sed -e '/Available Packages/q'
iOS build issue:
node -v
If using an Ionic Native Typescript wrapper for this plugin:
ionic info
npm list | grep "@ionic-native"
Related code:
insert any relevant code here such as plugin API calls / input parameters
Console output
// Paste any relevant JS/native console output here
Other information:
I'm submitting a ... (check one with "x"):
Current behavior:
Initializing gradle wrapper fails on latest cordova-android 7.1.2.
After running cordova prepare, I'm creating a graddle wrapper with:
gradle wrapper --gradle-version 4.4 --distribution-type all
The output is:
$ gradle wrapper --gradle-version 4.4 --distribution-type all
> Configure project :app
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Script '.../cordova/platforms/android/cordova-android-play-services-gradle-release/mobile-cordova-android-play-services-gradle-release.gradle' line: 11
* What went wrong:
A problem occurred evaluating script.
> Could not read script '.../cordova/platforms/android/app/cordova-android-play-services-gradle-release/properties.gradle' as it does not exist.
Expected behavior:
The gradle wrapper is created. This issue can't be reproduced with cordova-android 7.1.1.
Steps to reproduce:
Specify version or cordova-android in config.xml:
Then run prepare:
cordova prepare --verbose
After go to platforms/android directory and run:
gradle wrapper --gradle-version 4.4 --distribution-type all
Environment information
Cordova CLI version 8.0.0
Cordova platform version
Installed platforms:
android 7.1.2
Plugins & versions installed in project (including this plugin)
cordova-android-play-services-gradle-release 1.4.4 "cordova-android-play-services-gradle-release"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-ios-camera-permissions 1.2.0 "iOS Permissions"
cordova-plugin-privacyscreen 0.4.3 "PrivacyScreenPlugin"
cordova-plugin-recaptcha 1.0.2 "Cordova Recaptcha"
cordova-plugin-safariviewcontroller 1.5.4 "SafariViewController"
cordova-plugin-secure-storage 3.0.0 "SecureStorage"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-translucent-statusbar 1.0.0 "Translucent Statusbar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
es6-promise-plugin 4.2.2 "Promise"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"
Android build issue:
Other information:
From cordova changelog it looks related to this issue: https://issues.apache.org/jira/browse/CB-14125
Find release notes here: https://cordova.apache.org/announcements/2018/11/07/cordova-android-7.1.2.html
I'm submitting a ... (check one with "x"):
Current behavior:
I'm seeing following error with [email protected]
in combination with [email protected]
upon cordova build android
.
cordova-android-support-gradle-release: Android platform: cordova-android@7
cordova-android-support-gradle-release: Wrote custom version '27.+' to /********/platforms/android/app/build.gradle
cordova-android-support-gradle-release: ERROR: EXCEPTION: Error: ENOENT: no such file or directory, open '/********/platforms/android/app/cordova-android-support-gradle-release/properties.gradle'
Expected behavior:
Build succeeds.
Steps to reproduce:
Environment information
cordova -v
8.0.0
cordova platform ls
android 7.1.2
cordova plugin ls
sw_vers
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1212
Android build issue:
node -v
v8.9.1
ls platforms/android/.gradle
4.1 4.4.1 buildOutputCleanup
android:targetSdkVersion
in AndroidManifest.xml
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="27" />
sdkmanager --list | sed -e '/Available Packages/q'
sdkmanager: command not found
Related code:
Other information:
I see following files are installed:
platforms/android/app/src/main/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle
platforms/android/app/src/main/cordova-android-support-gradle-release/properties.gradle
platforms/android/app/src/main/app/cordova-android-support-gradle-release/cordova-android-support-gradle-release.gradle
platforms/android/app/src/main/app/cordova-android-support-gradle-release/properties.gradle
The behaviour of source-file
in [email protected]
is such that target-dir
without 'app/src/main' gets automatically prefixed with 'app/src/main':
https://github.com/apache/cordova-android/compare/7.1.0..7.1.2#diff-4f73e5f70cec312ae82aa7d023e3c88bR327
I'm using following fork with my apps for now. It works with [email protected]
but untested with other versions (probably does not work with cordova-android@7
prior to 7.1.2).
ippeiukai@5e229e4
i have two plugins conflict with each other when i build the app in phonegap build
cordova-plugin-facebook5
cordova-plugin-facebookads
please help
Cordova 8.
Build android with --release
.
* Where:
Script '/Users/ezheg/servicewhale/sw-mobile/platforms/android/CordovaLib/cordova.gradle' line: 147
* What went wrong:
Failed to create component for 'dialog' reason: java.awt.HeadlessException
> java.awt.HeadlessException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
(node:80324) UnhandledPromiseRejectionWarning: Error: /Users/ezheg/servicewhale/sw-mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
cordova.gradle
if (System.console() == null) {
def ret = null
new SwingBuilder().edt {
147: dialog(modal: true, title: 'Enter password', alwaysOnTop: true, resizable: false, locationRelativeTo: null, pack: true, show: true) {
vbox {
label(text: msg)
def input = passwordField()
button(defaultButton: true, text: 'OK', actionPerformed: {
ret = input.password;
dispose();
})
}
}
}
if (!ret) {
throw new GradleException('User canceled build')
}
return new String(ret)
} else {
return System.console().readPassword('\n' + msg);
}
}
BUILD FAILED
in 21s
25 actionable tasks: 3 executed, 22 up-to-date
/home/sattey/Desktop/fantasy/Game11-APP/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/sattey/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/bb55b06457401fc3ca8fde4b6066a62d/res/values/values.xml: AAPT: error: resource android:attr/fontVariationSettings not found.
/home/sattey/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/bb55b06457401fc3ca8fde4b6066a62d/res/values/values.xml: AAPT: error: resource android:attr/ttcIndex not found.
/home/sattey/Desktop/fantasy/Game11-APP/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:362: error: resource android:attr/fontVariationSettings not found.
/home/sattey/Desktop/fantasy/Game11-APP/platforms/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:362: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
at sun.reflect.GeneratedMethodAccessor334.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
... 47 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:463)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:415)
at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
FAILURE: Build failed with an exception.
===============================================
This is my ionic info:
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.1.2 ([email protected])
local packages:
@ionic/app-scripts : 3.2.4
Cordova Platforms : android 7.1.4
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v10.15.3
npm : 6.5.0
OS : Linux 4.15
Environment Variables:
ANDROID_HOME : /home/sattey/Android/Sdk/
Misc:
backend : pro
=======================================================
my plugin version:
config.xml ------
package.json --------
"cordova-android-support-gradle-release": "^3.0.0",
Please help me.
Hallo guys!
has anyone this error with latest SDK version and this plugin ?
* What went wrong:
Execution failed for task ':transformClassesWithPreJackPackagedLibrariesForArmv7Release'.
> java.lang.NullPointerException (no error message)
some additional info to my system:
cordova => 6.5.0
android platform => 6.3.0
plugins:
com.shazron.cordova.plugin.keychainutil 2.0.0 "KeyChain Plugin for Cordova iOS"
cordova-android-support-gradle-release 1.4.4 "cordova-android-support-gradle-release"
cordova-clipboard 1.2.1 "Clipboard"
cordova-plugin-android-fingerprint-auth 1.4.3 "FingerprintAuth"
cordova-plugin-android-permissions 0.10.0 "Permissions"
cordova-plugin-badge 0.8.7 "Badge"
cordova-plugin-ckopenimage 1.2.0 "cordova-plugin-ckopenimage"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-customurlscheme 4.3.0 "Custom URL scheme"
cordova-plugin-device 2.0.1 "Device"
cordova-plugin-document-viewer 0.9.9 "SitewaertsDocumentViewer"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-ignore-lint-translation 0.0.1 "cordova-plugin-ignore-lint-translation"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-safariviewcontroller 1.5.3 "SafariViewController"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-touch-id 3.3.1 "Touch ID"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.4 "Cordova WKWebView Engine"
cordova-plugin-x-toast 2.6.2 "Toast"
cordova-universal-links-plugin 1.2.1 "Universal Links Plugin"
OS:
ProductName: Mac OS X
ProductVersion: 10.13.5
BuildVersion: 17F77
Environment information
Android build issue:
Hi,
i love your Plugin and it is working good but i have one Problem on Windows PCs. I can reproduce this Bug on different Windows PCs.
When i add this Plugin and run cordova build android
i get the following Issue:
i found out that the android-sdk folder have now the wrong permission. So the command cannot write files there.
When i change the folder permissions recursive to Everyone or the User it is working.
Can you please check this Bug?
Thank You
Daniel
A common way to rebuild an android project is to delete the platforms/android folder, and then run the 'prepare' command again.
This fires an error from this plugin, as the project doesn't exist yet.
cordova-android-support-gradle-release.before-prepare: Android platform: cordova-android@6
cordova-android-support-gradle-release.before-prepare: ERROR: EXCEPTION: Error: ENOENT: no such file or directory, open '/Users/joshua/Projects/plantguard/client/cordova/platforms/android/cordova-android-support-gradle-release/properties.gradle'
Is there a better way to handle this?
I'm submitting a ... (check one with "x"):
Current behavior:
cordova-android-support-gradle-release: ERROR: EXCEPTION: Error: ENOENT: no such file or directory, open '/home/benni/htdocs/redacted/platforms/android/app/cordova-android-support-gradle-release/properties.gradle'
Expected behavior:
The plugin should work
Steps to reproduce:
cordova plugin add cordova-android-support-gradle-release
Environment information
8.0.0
Installed platforms: android 7.2.0-dev
com.synconset.cordovaHTTP 1.3.0 "SSL Pinning" com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions" cordova-android-support-gradle-release 1.4.4 "cordova-android-support-gradle-release" cordova-plugin-apprate 1.3.0 "AppRate" cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine" cordova-plugin-device 1.1.2 "Device" cordova-plugin-dialogs 1.2.1 "Notification" cordova-plugin-facebook4 2.1.0 "Facebook Connect" cordova-plugin-file 6.0.1 "File" cordova-plugin-file-transfer 1.7.2-dev "File Transfer" cordova-plugin-geolocation 4.0.1 "Geolocation" cordova-plugin-globalization 1.0.3 "Globalization" cordova-plugin-inappbrowser 1.4.0 "InAppBrowser" cordova-plugin-localization-strings 2.0.0 "Localization" cordova-plugin-network-information 1.2.1 "Network Information" cordova-plugin-splashscreen 3.2.2 "Splashscreen" cordova-plugin-statusbar 2.1.3 "StatusBar" cordova-plugin-whitelist 1.2.2 "Whitelist" cordova-plugin-zip 3.1.0 "cordova-plugin-zip" cordova-sqlite-storage 2.3.2 "Cordova sqlite storage plugin" cordova-support-google-services 1.1.0 "cordova-support-google-services" ionic-plugin-keyboard 2.2.1 "Keyboard" phonegap-plugin-multidex 1.0.0 "Multidex" phonegap-plugin-push 2.2.3 "PushPlugin"
Last version 1.1.3
cordova 6.5.0
Run cordova prepare
with empty platforms and plugins.
Failed to install 'cordova-android-support-gradle-release':Error: Cannot find module 'xml2js' at Function.Module._resolveFilename (module.js:527:15) at Function.Module._load (module.js:476:23) at Module.require (module.js:568:17) at require (internal/module.js:11:18) at Object.<anonymous> (.../plugins/cordova-android-support-gradle-release/scripts/after-prepare.js:3:14) at Module._compile (module.js:624:30) at Object.Module._extensions..js (module.js:635:10) at Module.load (module.js:545:32) at tryModuleLoad (module.js:508:12) at Function.Module._load (module.js:500:3) Failed to restore plugin "cordova-android-support-gradle-release" from config.xml. You might need to try adding it again. Error: Error: Cannot find module 'xml2js'
I'm submitting a ... (check one with "x"):
Current behavior:
After installing the plugin:
cordova-android-support-gradle-release: 27.+
I'm getting:
Android dependency 'com.android.support:appcompat-v7' has different version for the compile (28.0.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
Expected behavior:
Build successfully.
Steps to reproduce:
Create a new ionic-v1 cordova android project.
Install the plugin.
Try to compile.
Environment information
cordova -v
cordova platform ls
cordova plugin ls
sw_vers
Android build issue:
node -v
ls platforms/android/.gradle
android:targetSdkVersion
in AndroidManifest.xml
sdkmanager --list | sed -e '/Available Packages/q'
Available Packages:
Console output
Android dependency 'com.android.support:appcompat-v7' has different version for the compile (28.0.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
Other information:
Thank you.
I'm submitting a ... (check one with "x"):
Current behavior:
I recently added cordova-android-play-services-gradle-release to a project containing cordova-android-support-gradle-release (due to play service 12.0 issue, came here through this SO answer).
When I run cordova build android
, I get following error :
------------------------------------------------------------------------------------------
Copying notification icon resources to android resources directory...
------------------------------------------------------------------------------------------
cordova-android-play-services-gradle-release PLAY_SERVICES_VERSION: 11.8.0
cordova-android-support-gradle-release ANDROID_SUPPORT_VERSION: 25.+
notification_icon resources copied !
cordova-android-play-services-gradle-release : WROTE /path/to/my/project/platforms/android/build.gradle > 11.8.0
cordova-android-support-gradle-release : WROTE /path/to/my/project/platforms/android/build.gradle > 25.+
ANDROID_HOME=/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home
Reading build config file: /path/to/my/project/build.json
Reading the keystore from: /path/to/my/project/certs/cma-key.jks
Subproject Path: CordovaLib
FAILURE: Build failed with an exception.
* Where:
Build file '/path/to/my/project/platforms/android/build.gradle' line: 322
* What went wrong:
Could not compile build file '/path/to/my/project/platforms/android/build.gradle'.
> startup failed:
build file '/path/to/my/project/platforms/android/build.gradle': 322: unexpected token: ( @ line 322, column 1.
()
^
1 error
* 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: 0.734 secs
Error: /path/to/my/project/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Build file '/path/to/my/project/platforms/android/build.gradle' line: 322
build.gradle file is looking like :
for (def func : cdvPluginPostBuildExtras) {
func()
}
// This can be defined within build-extras.gradle as:
// ext.postBuildExtras = { ... code here ... }
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
()
}
()
}
I suspect there are some conflict between plugins collaborating to build.gradle (see my cordova plugins list below)
Expected behavior:
No build.gradle code generation resulting into compilation errors
Environment information
Installed platforms:
android 6.2.3
browser 4.1.0
ios 4.5.2
cordova-android-play-services-gradle-release 1.2.1 "cordova-android-play-services-gradle-release"
cordova-android-support-gradle-release 1.2.1 "cordova-android-support-gradle-release"
cordova-background-geolocation 2.7.3 "BackgroundGeolocation"
cordova-custom-config 2.0.3 "cordova-custom-config"
cordova-plugin-background-fetch 5.1.1 "CDVBackgroundFetch"
cordova-plugin-cocoalumberjack 0.0.4 "CocoaLumberjack"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-dialogs 1.3.3 "Notification"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-google-analytics 1.7.11 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.7.0 "InAppBrowser"
cordova-plugin-network-information 1.2.1 "Network Information"
cordova-plugin-request-location-accuracy 2.2.2 "Request Location Accuracy"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova.plugins.diagnostic 3.7.0 "Diagnostic"
phonegap-plugin-barcodescanner 6.0.4 "BarcodeScanner"
ProductName: Mac OS X
ProductVersion: 10.12.6
BuildVersion: 16G1114
Other information:
https://stackoverflow.com/a/49431381
#18
Regards,
If i don't have any plugin which needs to be configured in the config.xml, cordova-android-support-gradle-release
produces an error
Error: Cannot read property 'length' of undefined
Please have a look at scripts/before-prepare.js#15
of the current release version where plugins
also can be undefined.
thx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.