Cordova-plugin-local-notifications: Latest version causing Errors when use online PhoneGap Build

Created on 31 Oct 2017  路  49Comments  路  Source: katzer/cordova-plugin-local-notifications

I use the plugin in config.xml like this:
plugin spec="https://github.com/katzer/cordova-plugin-local-notifications"

When I build my app using online PhoneGap Build, it reports errors:


/project/src/de/appplant/cordova/plugin/notification/Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
^
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
^
symbol: class NotificationChannel
location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
symbol: static O
location: class
/project/src/de/appplant/cordova/plugin/notification/Builder.java:125: error: constructor Builder in class Builder cannot be applied to given types;
builder = new NotificationCompat.Builder(context, Manager.CHANNEL_ID)
^
required: Context
found: Context,String
reason: actual and formal argument lists differ in length
/project/src/de/appplant/cordova/plugin/notification/Builder.java:292: error: cannot find symbol
MediaStyle style;
^
symbol: class MediaStyle
location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Builder.java:294: error: cannot find symbol
style = new MediaStyle(builder)
^
symbol: class MediaStyle
location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
if (SDK_INT < O)

.......

The point is there is no errors before yesterday when I build my app for many times. So I think it must be some new codes changed on these days which causes the problem.

Most helpful comment

What worked for me was changing the 'target' property on file project.properties to 'android-26'.

All 49 comments

The master branch has been updated yesterday from v0.8.5 to v0.9.beta

You can try out what mentioned here:
https://github.com/phonegap/phonegap-plugin-push/issues/141

Maybe the easiest way is to remove the android platform and add it again.

For Android, the minSdkVersion is 23 and it requires the support-library v4:26.+

I have added all the sdk 23,24,25,26,27 versions and I'm using support repo 47. I have rm and readd android platform for each test. Issue still persists on 0.9 android.

The same:

App ID
2835045

Version=> 2.3.0
PhoneGap (iOS / Android / Windows)=> cli-6.5.0 (4.3.1 / 6.1.2 / 4.4.3)

"plugman install --platform android --project /project --plugin cordova-plugin-local-notifications": Fetching plugin "cordova-plugin-local-notifications" via npm
Installing "de.appplant.cordova.plugin.local-notification" at "0.8.2dev" for android
Fetching plugin "org.apache.cordova.device" via npm
Failed to install 'de.appplant.cordova.plugin.local-notification': CordovaError: Failed to fetch plugin org.apache.cordova.device via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/org.apache.cordova.device
at /.npm/lib/node_modules/pgb-plugman/node_modules/pgb-cordova-lib/src/plugman/fetch.js:205:33
at _rejected (/.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:797:24)
at /.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:823:30
at Promise.when (/.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:1035:31)
at Promise.promise.promiseDispatch (/.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:741:41)
at /.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:557:44
at flush (/.npm/lib/node_modules/pgb-plugman/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Failed to fetch plugin org.apache.cordova.device via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: Registry returned 404 for GET on https://registry.npmjs.org/org.apache.cordova.devic

Me too with the following config.xml extract:

<preference name="android-minSdkVersion" value="17" />
<preference name="android-targetSdkVersion" value="23" />
<preference name="android-compileSdkVersion" value="26" />
<preference name="phonegap-version" value="cli-7.0.1" />
<preference name="pgb-builder-version" value="1" />
<plugin name="cordova-plugin-local-notifications"
    spec="https://github.com/katzer/cordova-plugin-local-notifications.git#0.9.0-beta.0" />

Error is:

error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;

PGB logs:

Build Date: 2017-10-31 18:57:39 +0000
Configuration on demand is an incubating feature.
:wrapper

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild 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
:prepareComAndroidSupportCustomtabs2320Library
:prepareComAndroidSupportSupportCompat2600Alpha1Library
:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:prepareComAndroidSupportSupportFragment2600Alpha1Library
:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:prepareComAndroidSupportSupportV42600Alpha1Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1104Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1104Library
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1104Library
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:prepareMeLeolinShortcutBadger1119Library
:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/project/src/de/appplant/cordova/plugin/notification/Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
                                                      ^
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Builder.java:125: error: constructor Builder in class Builder cannot be applied to given types;
        builder = new NotificationCompat.Builder(context, Manager.CHANNEL_ID)
                  ^
  required: Context
  found: Context,String
  reason: actual and formal argument lists differ in length
/project/src/de/appplant/cordova/plugin/notification/Builder.java:292: error: cannot find symbol
        MediaStyle style;
        ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Builder.java:294: error: cannot find symbol
        style = new MediaStyle(builder)
                    ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
10 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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: 3.329 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/src/de/appplant/cordova/plugin/notification/Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
                                                      ^
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Builder.java:125: error: constructor Builder in class Builder cannot be applied to given types;
        builder = new NotificationCompat.Builder(context, Manager.CHANNEL_ID)
                  ^
  required: Context
  found: Context,String
  reason: actual and formal argument lists differ in length
/project/src/de/appplant/cordova/plugin/notification/Builder.java:292: error: cannot find symbol
        MediaStyle style;
        ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Builder.java:294: error: cannot find symbol
        style = new MediaStyle(builder)
                    ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
10 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

@katzer Thanks for help. But the methods you recommended are for ADT build, while my team is using the PhoneGap build Cloud service.
Is it possible to fix it for PhoneGap build Cloud service by just modify the config.xml?

@katzer, I did not have to follow your recommendations to build locally: phonegap run android works and notifications are displayed in the android emulator without any specific tweaks but the same app and config.xml do not build on PGB (logs and config above).

@michaeltangcn @jlchereau I dont use PGB - so I cannot try out myself. From the error logs its clear that the android support library is missing.

v0.8.5

<framework src="com.android.support:support-v4:25.+" value="gradle" />

v0.9-beta

<framework src="com.android.support:support-v4:26.+" value="gradle" />

However there's another strange compile error because its part of the plain Android SDK. That I can change but it looks like that the SDK for Android 8 is not present. Please compile with the latest SDK.

/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;

Also you need to increase your min target

<preference name="android-minSdkVersion" value="23" />

In other plugins like pushwoosh-phonegap-plugin they just use

<framework src="com.android.support:support-v4:26.+" />

Could anyone tell me if PGB works with pushwoosh-phonegap-plugin?

You can fork the repo, change that line and then try to build on PGB using your fork.

@oscarricardosan

Fetching plugin "cordova-plugin-local-notifications" via npm
Installing "de.appplant.cordova.plugin.local-notification" at "0.8.2dev" for android

From your logs you install v0.8.2dev. Thats quite old version....

@katzer, I have just tried building the same app without cordova-plugin-local-notifications but with pushwoosh-phonegap-plugin and it builds both locally and on PGB.

phonegap plugin remove cordova-plugin-local-notifications
phonegap plugin add [email protected]

Now forking as per your request...

Forked at https://github.com/jlchereau/cordova-plugin-local-notifications/blob/master/plugin.xml#L99

Then added as

phonegap plugin add https://github.com/jlchereau/cordova-plugin-local-notifications.git

Android build still fails:

Build Date: 2017-11-01 10:29:51 +0000
Configuration on demand is an incubating feature.
:wrapper

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
Download https://repo1.maven.org/maven2/me/leolin/ShortcutBadger/1.1.19/ShortcutBadger-1.1.19.pom
Download https://repo1.maven.org/maven2/me/leolin/ShortcutBadger/1.1.19/ShortcutBadger-1.1.19.aar
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild 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
:prepareComAndroidSupportCustomtabs2320Library
:prepareComAndroidSupportSupportCompat2600Alpha1Library
:prepareComAndroidSupportSupportCoreUi2600Alpha1Library
:prepareComAndroidSupportSupportCoreUtils2600Alpha1Library
:prepareComAndroidSupportSupportFragment2600Alpha1Library
:prepareComAndroidSupportSupportMediaCompat2600Alpha1Library
:prepareComAndroidSupportSupportV42600Alpha1Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1104Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1104Library
:prepareComGoogleAndroidGmsPlayServicesBase1104Library
:prepareComGoogleAndroidGmsPlayServicesBasement1104Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1104Library
:prepareComGoogleAndroidGmsPlayServicesTasks1104Library
:prepareMeLeolinShortcutBadger1119Library
:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/project/src/de/appplant/cordova/plugin/notification/Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
                                                      ^
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Builder.java:125: error: constructor Builder in class Builder cannot be applied to given types;
        builder = new NotificationCompat.Builder(context, Manager.CHANNEL_ID)
                  ^
  required: Context
  found: Context,String
  reason: actual and formal argument lists differ in length
/project/src/de/appplant/cordova/plugin/notification/Builder.java:292: error: cannot find symbol
        MediaStyle style;
        ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Builder.java:294: error: cannot find symbol
        style = new MediaStyle(builder)
                    ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
10 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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: 8.465 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/src/de/appplant/cordova/plugin/notification/Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;
                                                      ^
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Builder.java:125: error: constructor Builder in class Builder cannot be applied to given types;
        builder = new NotificationCompat.Builder(context, Manager.CHANNEL_ID)
                  ^
  required: Context
  found: Context,String
  reason: actual and formal argument lists differ in length
/project/src/de/appplant/cordova/plugin/notification/Builder.java:292: error: cannot find symbol
        MediaStyle style;
        ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Builder.java:294: error: cannot find symbol
        style = new MediaStyle(builder)
                    ^
  symbol:   class MediaStyle
  location: class Builder
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
10 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

@jlchereau Could you try again with my latest commit

Will do. I was progressing on the same track:

/* https://developer.android.com/topic/libraries/support-library/setup.html#using-apis */

repositories {
   jcenter()
   maven {
       url "https://maven.google.com"
   }
}

if (!project.ext.has('appShortcutBadgerVersion')) {
    ext.appShortcutBadgerVersion = '1.1.19'
}

/* https://developer.android.com/topic/libraries/support-library/packages.html */

dependencies {
    compile "com.android.support:support-compat:26.+"
    compile "com.android.support:support-core-utils:26.+"
    compile "com.android.support:support-core-ui:26.+"
    compile "com.android.support:support-media-compat:26.+"
    compile "com.android.support:support-fragment:26.+"
    compile "me.leolin:ShortcutBadger:${appShortcutBadgerVersion}@aar"
}

Your latest commit:

Build Date: 2017-11-01 11:48:06 +0000
Configuration on demand is an incubating feature.
:wrapper

BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild 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
:prepareComAndroidSupportCustomtabs2320Library
:prepareComAndroidSupportSupportCompat2610Library
:prepareComAndroidSupportSupportCoreUi2610Library
:prepareComAndroidSupportSupportCoreUtils2610Library
:prepareComAndroidSupportSupportFragment2610Library
:prepareComAndroidSupportSupportMediaCompat2610Library
:prepareComAndroidSupportSupportV42610Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImplLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesBase1142Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesBasement1142Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1142Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4ImplLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesTasks1142Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1142Library
:prepareMeLeolinShortcutBadger1119Library
:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
6 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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.813 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/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
                  ^
  symbol:   class NotificationChannel
  location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
  symbol:   static O
  location: class
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
        if (SDK_INT < O)
                      ^
  symbol:   variable O
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
        ^
  symbol:   class NotificationChannel
  location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
        NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
                                         ^
  symbol:   method getNotificationChannel(String)
  location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
        channel = new NotificationChannel(
                      ^
  symbol:   class NotificationChannel
  location: class Manager
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.
6 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

OK, that fixed it. The other errors come up because the project compiles with an older SDK. Please set the compile sdk version to Android Orio (26 if I am right).

Thx. Do you mean we need to wait until PGB upgrades its SDK support in order to use https://github.com/katzer/cordova-plugin-local-notifications ?

Really, PGB does not support Android 8 ?

<preference name="android-minSdkVersion" value="23" />
<preference name="android-targetSdkVersion" value="26" />
<preference name="android-compileSdkVersion" value="26" />

I also target level 26 which PGB does not complain about.

I think cordova-android 6.2.3 is the issue here. PGB does not yet support 6.3.0.

I have:

<engine name="browser" spec="^5.0.1" />
<engine name="windows" spec="^5.0.0" />
<engine name="android" spec="^6.3.0" />
<engine name="ios" spec="^4.5.3" />

but PGB downgrades:

  • android to 6.2.3
  • iOS to 4.4.0

image

In my development environment, when I do

phonegap platform remove android
phonegap platform add [email protected]
phonegap build android

I get:

[phonegap] executing 'cordova build android ' ...
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131\

Starting a Gradle Daemon (subsequent builds will be faster)

: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_1c4gbplcff0zkp0vsvo4dvkm0.run(D:\WebStorm\Kidoju\Kidoju.Mobile\platforms\android\build.gradle:140)

File C:\Users\xxxxxx\.android\repositories.cfg could not be loaded.


Checking the license for package Android SDK Platform 25 in C:\Program Files (x86)\Android\android-sdk\licenses

License for package Android SDK Platform 25 accepted.


Preparing "Install Android SDK Platform 25".


Warning: Failed to read or create install properties file.




FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring root project 'android'.
> Failed to install the following SDK components:
  [Android SDK Platform 25]

  The SDK directory (C:\Program Files (x86)\Android\android-sdk) is not writeable,

  please update the directory permissions.


* 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: 6.984 secs

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Failed to install the following SDK components:
  [Android SDK Platform 25]
  The SDK directory (C:\Program Files (x86)\Android\android-sdk) is not writeable,
  please update the directory permissions.

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

So cordova-android 6.2.3 seems to force the use of Android SDK Platform 25

What happens if you set

<preference name="android-minSdkVersion" value="26" />

Same result both in PGB and local dev env with:

<preference name="android-minSdkVersion" value="26" />
<preference name="android-targetSdkVersion" value="26" />
<preference name="android-compileSdkVersion" value="26" />

cordova-android 6.2.3 seems to force the use of Android SDK Platform 25.

Hi @jlchereau @katzer

cordova plugin add cordova-plugin-local-notifications I get error :skull: (in local and PGB).

cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git#0.8.5 works
:smiley: (in local and PGB)


cordova plugin add cordova-plugin-local-notifications

Installing "de.appplant.cordova.plugin.local-notification" for android
Failed to install 'de.appplant.cordova.plugin.local-notification': CordovaError: Failed to fetch plugin org.apache.cordova.device via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code E404
npm ERR! 404 Not Found: org.apache.cordova.device@latest

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/masterdev/.npm/_logs/2017-11-01T15_35_53_560Z-debug.log
    at /usr/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:215:37
    at _rejected (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:864:24)
    at /usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:890:30
    at Promise.when (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:1142:31)
    at Promise.promise.promiseDispatch (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:808:41)
    at /usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:624:44
    at runSingle (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:137:13)
    at flush (/usr/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Hello folks,
I don't know if I'm talk about a different issue or not... but I've problems to build my app using Cordova CLI... it seems to be related with Android SDK issue, once I run the Android SDK Manager I must update SDK Platform-tools 26.0.2 but I can't:

Downloading Android SDK Platform-tools, revision 26.0.2 Download finished with wrong checksum. Expected 98832431e339c82be1fe910a733a3782071200fd, got aa3ef6f18eff4b8f12dbdf980647a6ce6c2ebe8c.

Can this be the same issue?

@oscarricardosan Your log points to a bug from cordova CLI from my perspective. I was fighting with similar issue some days ago.

You're trying to install cordova-plugin-local-notifications, however cordova does install de.appplant.cordova.plugin.local-notification. Which is not the same.

cordova-plugin-local-notifications (v0.9-beta) isn't yet available on npm. So you need to install from GitHub or local file system. It might help to delete all cached meta info about cordova-plugin-local-notifications or de.appplant.cordova.plugin.local-notification by hand.

@braglin That looks different. The checksum mismatch isn't related to the plugin. More an issue by google or something else.

@katzer ... well it's strange because other plugins also stopped work suddenly (1h interval), so I'm thinking about some changes in Google playServices or Google SDK.
In my case I only solved my problem after remove the SDK and install again... Also for other plugins I add some packages to my project.properties file that I doesn't need to add before...

Well, now it works for me! I hope you find a solution for the others!

I don't know if this is related or not:

FAILURE: Build failed with an exception.

  • What went wrong:

Execution failed for task ':processArmv7DebugResources'.

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: 18.66 secs

Error: /Users/B42/Bilemezsin/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.
ERROR: In FontFamilyFont, unable to find attribute android:font
ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In FontFamilyFont, unable to find attribute android:fontWeight

FAILURE: Build failed with an exception.

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

    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.

@Slavezax I have the same error.

@Slavezax This thread may help you

It worked for me, thanks a lot @gehirnmitei

I had the same error in my ionic v1 project, after a lot testing i decided to instal the old version and it worked again.

cordova plugin rm de.appplant.cordova.plugin.local-notification
cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications#0.8.5

@Vmussato Despite the discussed issues here, the wrapper from ionic-native for the local-notification plugin isn't compatible yet with v0.9-beta.

@julitroalves @michaeltangcn @katzer
How did you solve this after all?
Which label should we use to get it work on phonegap config.xml file, is it this?

@abomokhahmed what worked for me was related by @gehirnmitei answer.
I just remove old android platform and added a new updated android platform

cordova plugin rm cordova-plugin-compat --force
cordova platform rm android
ionic cordova platform add [email protected]

@julitroalves The plugin id is define in plugin.xml. But the source must be GitHub, not npm.

As I haven't received a response from the person who uses cordova-plugin-local-notification on npm I will need to switch back to cordova-plugin-local-notifications.

@jlchereau I am stuck on PGB the same error as yours in log file.
Did you solve the problem? How to solve this issue?
what setting did you use at config.xml?
I get this error:
"Error - Some official plugins have to be updated if using PhoneGap >= 4.0.0. Please upgrade the version of any plugins that may include the following file: Manager.java - You can fix this here"

And on log file I get:

"Build Date: 2017-11-26 20:36:22 +0000
Subproject Path: CordovaLib
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild 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
:prepareComAndroidSupportSupportCompat2610Library
:prepareComAndroidSupportSupportCoreUi2610Library
:prepareComAndroidSupportSupportCoreUtils2610Library
:prepareComAndroidSupportSupportFragment2610Library
:prepareComAndroidSupportSupportMediaCompat2610Library
:prepareComAndroidSupportSupportV132340Library
:prepareComAndroidSupportSupportV42610Library
:prepareComGoogleAndroidGmsPlayServicesBase1160Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1160Library
:prepareComGoogleAndroidGmsPlayServicesBasement1160Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1160Library
:prepareComGoogleAndroidGmsPlayServicesGcm1160Library
:prepareComGoogleAndroidGmsPlayServicesGcmLicense1160Library
:prepareComGoogleAndroidGmsPlayServicesIid1160Library
:prepareComGoogleAndroidGmsPlayServicesIidLicense1160Library
:prepareComGoogleAndroidGmsPlayServicesTasks1160Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1160Library
:prepareMeLeolinShortcutBadger1119Library
:prepareProjectCordovaLibUnspecifiedReleaseLibrary
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/project/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
^
symbol: class NotificationChannel
location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
symbol: static O
location: class
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
if (SDK_INT < O)
^
symbol: variable O
location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: class NotificationChannel
location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: method getNotificationChannel(String)
location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
channel = new NotificationChannel(
^
symbol: class NotificationChannel
location: class Manager
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.
6 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

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

    Compilation failed; see the compiler error output for details.

  • 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.244 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/src/de/appplant/cordova/plugin/notification/Manager.java:24: error: cannot find symbol
import android.app.NotificationChannel;
^
symbol: class NotificationChannel
location: package android.app
/project/src/de/appplant/cordova/plugin/notification/Manager.java:41: error: cannot find symbol
import static android.os.Build.VERSION_CODES.O;
^
symbol: static O
location: class
/project/src/de/appplant/cordova/plugin/notification/Manager.java:109: error: cannot find symbol
if (SDK_INT < O)
^
symbol: variable O
location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: class NotificationChannel
location: class Manager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:112: error: cannot find symbol
NotificationChannel channel = mgr.getNotificationChannel(CHANNEL_ID);
^
symbol: method getNotificationChannel(String)
location: variable mgr of type NotificationManager
/project/src/de/appplant/cordova/plugin/notification/Manager.java:117: error: cannot find symbol
channel = new NotificationChannel(
^
symbol: class NotificationChannel
location: class Manager
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.
6 errors

FAILURE: Build failed with an exception.

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

    Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/project/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)"

Please, If you have any possible solution, I will appreciate to hear from you. thanks

@abomokhahmed, until Adobe upgrades PGB with the latest android sdks, I have found no other option than using v0.8.5 of the plugin.

On 21 jan 2018: PGB updated with support for [email protected] + sdk 26 and v0.9.0-beta now builds.

Hello! @katzer or anyone, can you tell me if the version 0.9.0 of the plugin can't be used with ionic yet?

Thanks!

@MeggSan Yes I think so

I had this issue locally and figured out the cause for anyone searching this in the future. My issue locally is that another plugin was pulling in an old version of android support v4. I searched through the plugin.xml files for the offending line and replaced it with the suggested:
<framework src="com.android.support:support-v4:26.+" value="gradle" />

I fixed this issue on Online phonegap Build using this plugin on config.xml:

<plugin name="de.appplant.cordova.plugin.local-notification" spec="~0.8.5" />

What worked for me was changing the 'target' property on file project.properties to 'android-26'.

@ammichael what project.properties file?

@dadisigursveinn /platforms/android/project.properties

Am I correct that at this moment it is in no way possible to build via Phonegap Build and use the 0.9.0 v2 beta?
At this moment I am still using 0.8.5, but the new features from 0.9.0 look really cool :)

Thanks in advance for any comment on this!
Kind regards,
Michiel

@ammichael 's fix worked for me. One problem though: each time I do a fresh git clone on my ionic 3 project it err's and I have to manually set the target. Does anyone know how to force android-26 via config files? So that I can build without having to do things manually. Cheers.

Hey, i also tried using your Plugin with Phonegap Build.
I have the following config.xml:
<preference name="phonegap-version" value="cli-8.0.0" />
<framework src="com.android.support:support-v4:26.+" value="gradle" />
<plugin name="cordova-plugin-local-notifications" spec="https://github.com/katzer/cordova-plugin-local-notifications#0.8.5" />

And it gives the following log:

Build Date: 2018-12-02 20:40:23 +0000

PREPARE OUTPUT

Android Studio project detected
Generating platform-specific config.xml from defaults for android at /app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [, ../platform_www] to ../app/src/main/assets/www
copy config.xml ../app/src/main/assets/www/config.xml (new file)
mkdir ../app/src/main/assets/www/cordova-js-src
mkdir ../app/src/main/assets/www/cordova-js-src/android
copy ../platform_www/cordova-js-src/android/nativeapiprovider.js ../app/src/main/assets/www/cordova-js-src/android/nativeapiprovider.js (new file)
copy ../platform_www/cordova-js-src/android/promptbasednativeapi.js ../app/src/main/assets/www/cordova-js-src/android/promptbasednativeapi.js (new file)
copy ../platform_www/cordova-js-src/exec.js ../app/src/main/assets/www/cordova-js-src/exec.js (new file)
copy ../platform_www/cordova-js-src/platform.js ../app/src/main/assets/www/cordova-js-src/platform.js (new file)
mkdir ../app/src/main/assets/www/cordova-js-src/plugin
mkdir ../app/src/main/assets/www/cordova-js-src/plugin/android
copy ../platform_www/cordova-js-src/plugin/android/app.js ../app/src/main/assets/www/cordova-js-src/plugin/android/app.js (new file)
copy ../platform_www/cordova.js ../app/src/main/assets/www/cordova.js (updated file)
rmdir ../app/src/main/assets/www/css (no source)
delete ../app/src/main/assets/www/css/index.css (no source)
rmdir ../app/src/main/assets/www/img (no source)
delete ../app/src/main/assets/www/img/cordova.png (no source)
delete ../app/src/main/assets/www/img/logo.png (no source)
copy index.html ../app/src/main/assets/www/index.html (updated file)
rmdir ../app/src/main/assets/www/js (no source)
delete ../app/src/main/assets/www/js/index.js (no source)
copy loading.png ../app/src/main/assets/www/loading.png (new file)
copy splash.png ../app/src/main/assets/www/splash.png (new file)
Wrote out android application name "HCS" to /app/src/main/res/values/strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.2): 2
Wrote out Android package name "com.cardijey.hcs" to /app/src/main/java/com/cardijey/hcs/HCS.java
Updating icons at ../app/src/main/res
delete ../app/src/main/res/mipmap-hdpi/icon.png (no source)
delete ../app/src/main/res/mipmap-ldpi/icon.png (no source)
copy splash.png ../app/src/main/res/mipmap-mdpi/icon.png (updated file)
delete ../app/src/main/res/mipmap-xhdpi/icon.png (no source)
delete ../app/src/main/res/mipmap-xxhdpi/icon.png (no source)
delete ../app/src/main/res/mipmap-xxxhdpi/icon.png (no source)
Updating splash screens at ../app/src/main/res
delete ../app/src/main/res/drawable-land-hdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-ldpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-mdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xxhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-land-xxxhdpi/screen.png (no source)
copy loading.png ../app/src/main/res/drawable-mdpi/screen.png (new file)
delete ../app/src/main/res/drawable-port-hdpi/screen.png (no source)
delete ../app/src/main/res/drawable-port-ldpi/screen.png (no source)
delete ../app/src/main/res/drawable-port-mdpi/screen.png (no source)
delete ../app/src/main/res/drawable-port-xhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-port-xxhdpi/screen.png (no source)
delete ../app/src/main/res/drawable-port-xxxhdpi/screen.png (no source)
This app does not have additional resource files defined

Prepared android project successfully

PLUGIN OUTPUT

Fetching plugin "[email protected]" via npm
Installing "cordova-plugin-whitelist" at "1.2.2" for android
Android Studio project detected

           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 "https://github.com/katzer/cordova-plugin-local-notifications" via git clone
Using shallow clone
Repository "https://github.com/katzer/cordova-plugin-local-notifications" checked out to git ref "0.8.5" at "53262c8".
Installing "de.appplant.cordova.plugin.local-notification" at "0.8.5" for android
Fetching plugin "cordova-plugin-device" via npm
Installing "cordova-plugin-device" at "2.0.2" for android
Android Studio project detected
Fetching plugin "cordova-plugin-app-event" via npm
Installing "cordova-plugin-app-event" at "1.2.1" for android
Subproject Path: CordovaLib
Subproject Path: app

Android Studio project detected

PROJECT PROPERTIES

This file was originally created by the Android Tools, but is now

used by cordova-android to manage the state of the various third party

libraries used in your application

This is the Library Module that contains the Cordova Library, this is not

required when using an AAR

This is the application project. This is only required for Android Studio Gradle projects

Project target.

target=android-26
android.library.reference.1=CordovaLib
android.library.reference.2=app

cordova.system.library.1=com.android.support:support-v4:+

COMPILE OUTPUT

Android Studio project detected
studio
:wrapper

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.1/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Exception while marshalling /opt/android-sdk/build-tools/26.0.3/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/extras/google/instantapps/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/platform-tools/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/platforms/android-28/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/build-tools/26.0.3/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/extras/google/instantapps/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/platform-tools/package.xml. Probably the SDK is read-only
Exception while marshalling /opt/android-sdk/platforms/android-28/package.xml. Probably the SDK is read-only
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_bheenv71qblbaaqh1wf9r651m.run(/app/build.gradle:143)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:checkDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:platformAttrExtractor
:CordovaLib:processDebugManifest
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript
:app:checkDebugManifest
:app:generateDebugBuildConfig
:app:prepareLintJar
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:app:mergeDebugJniLibFolders
:app:processDebugJavaRes NO-SOURCE
:app:validateSigningDebug
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:processDebugResources/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9fe1bd91bacced6cc417b49ec402dee8/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9fe1bd91bacced6cc417b49ec402dee8/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: error: resource android:attr/fontVariationSettings not found.
/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: 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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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)
... 48 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)
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)
FAILED
37 actionable tasks: 37 executed

FAILURE: Build failed with an exception.

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

    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.

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

BUILD FAILED in 11s
Error: /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.
/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9fe1bd91bacced6cc417b49ec402dee8/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9fe1bd91bacced6cc417b49ec402dee8/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: error: resource android:attr/fontVariationSettings not found.
/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:87: 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.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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)
... 48 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)
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
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.

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

    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.

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

BUILD FAILED in 11s
at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

please any one has fix this issue ?

@ammichael 's fix worked for me. One problem though: each time I do a fresh git clone on my ionic 3 project it err's and I have to manually set the target. Does anyone know how to force android-26 via config files? So that I can build without having to do things manually. Cheers.

    <preference name="android-minSdkVersion" value="19" />
    <preference name="android-targetSdkVersion" value="28" />
    <preference name="target-device" value="universal" />

that sets it to 28, which is required if you're going to release it on the Play store. I think it's 28 that's required anyway, Google has new rules

Is the ionic-native wrapper still incompatible with the 0.9.0-beta.2 ?

Was this page helpful?
0 / 5 - 0 ratings