Capacitor: Building without push-notifications plugin is not possible

I have been attempting to utilize the capacitor push notifications plugin in a quasar project. I followed this tutorial as a guide.

However, upon running the command:

quasar build -m capacitor -T android
, I encountered this error within my quasar project:

> Task :capacitor-push-notifications:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':capacitor-push-notifications:compileReleaseJavaWithJavac'.
> invalid source release: 11

Uncertain whether the error is due to the plugin itself or an issue during installation, I attempted to redo the tutorial from scratch but continued to receive the same error message.

Note:

Prior to installing this plugin, the building process was functioning correctly.

While development using quasar dev on the web still works, it does generate this error message:

Error: "PushNotifications" plugin is not implemented on web
.

Running quasar dev for android produces the following output:

src-capacitor/node_modules/@capacitor/push-notifications/android/src/main/java/com/capacitorjs/plugins/pushnotifications/PushNotificationsPlugin.java:3: error: package android.app does not exist import android.app.Notification;

Answer №1

First and foremost, when testing in development mode with capacitor, it is recommended to use:

quasar dev -m capacitor -T android

In order to test capacitor plugins, you need to install them inside the src-capacitor directory.

To utilize capacitor plugins in normal development mode as well, you must also install the plugin in the root folder of the quasar project.

Don't forget to check your package.json inside src-capacitor for any necessary installations.

If you encounter an error after installing version 4.x of the notification plugin, follow these steps:

Remove the package inside src-capacitor

npm remove @capacitor/push-notifications 

npx cap sync

Then reinstall by specifying version 1.0.9

npm install @capacitor/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="057570766d286b6a716c636c6664716c6a6b7645342b28507175">[email protected]</a>

npx cap sync

Many plugins may experience similar issues like this one.

For instance, the StatusBar plugin may encounter a similar error when installing the latest update.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Send the id of the chosen row to the Component tag within the blade file

I'm working on passing the id of the currently selected row within a for loop when it's clicked on. The goal is to then pass that id to a Vue component. In my index.blade file: @foreach($cats as $cat) <tr> <td class="catme" d ...

The Safari browser is currently having trouble loading the data sent back from the server

After successfully developing and deploying my website carspeedyrental.com, I received reports from some clients indicating that the website does not display available cars on the iPhone Safari browser. Interestingly, when tested on various browsers on A ...

Visitor capacity for the website has been restricted

I have created a website that I want only individuals with a license to access. I am wondering how I can restrict each license to a certain number of nodes, meaning the number of visitors allowed. For example: A person with a license for 2 visitors should ...

Download an image file directly from an HTTP response in Laravel using Vue, Axios, and Intervention Image

Currently, I am in the process of setting up a media asset database by utilizing Laravel, Vue, Axios, and Intervention image. One of my main objectives is to allow the user to specify their desired image height and width before proceeding with the download ...

Looking to update a component in Vue 3 and Laravel 9 without the need to reload the entire webpage

Looking for a solution to refresh the header component upon clicking the logout button, in order to display the login and register options without refreshing the entire page. Any effective suggestions on how to achieve this are greatly appreciated. The l ...

PHP and Vue component not displaying properly on webpage

I am having some trouble with my PHP code, as I am attempting to incorporate a Vue component into an HTML file. However, all I see is a blank page and there are no JavaScript errors appearing. Could someone please review the code below and let me know if ...

The JSON index is beyond the range [0..1)

I have been attempting to retrieve data from a MySql database using Volley in a JSONArray. The PHP script used to fetch rows from the table is shown below: <?php ob_start(); header('Content-Type: application/json'); $con=mysqli_connect("local ...

Having trouble receiving responses from pusher when attempting to utilize private channels, without any error notifications being displayed

While utilizing a public channel, I receive the responses without any issue. However, when I switch to a private channel and the channels.php check returns true, I am not receiving any response. According to Pusher's logs, the message is being success ...

Obtaining data from MySQL and transferring it to SQLite with a specified parameter in Android

I'm working on a .java class that retrieves data from MySQL. How can I ensure that the data fetched from MySQL is specific to the userID logged into mobile? Here's the code snippet that fetches all data from MySQL: package a.a; import java.u ...

What is the standard way to write the server-side code for HTTP request and response handling?

I stumbled upon these resources: How to send HTTP request GET/POST in Java and How to SEND HTTP request in JAVA While I understand the client-side aspect, how can this implementation be done on the server side? The goal is to utilize the link on the clie ...

Transferring information from an Android device

I am having trouble sending data from an Android device to PHP. Despite my attempts, I am unable to identify the mistake I have made. How can I rectify this issue? Below is the snippet of the Android code that I have implemented: public class php_connect ...

Here is a unique rewrite: "Strategies for effectively passing the data variable in the geturldata function within Vue.js on the HTML side vary

How can I properly pass a variable in the getdataurl function in Vue.js? I need help with passing a variable in getdataurl function in Vue.js. Please provide a clear explanation and include as much detail as possible. I have tried doing some background r ...

There was an issue with parsing the data due to a JSONException stating that the value of type java.lang.String cannot be converted

I've been encountering an error while working with PHP, MySQL, and JSON for the past two days. Here are the snippets of my code: require "includes/connexion.php"; $requete="SELECT * FROM contacts;"; $rep=$pdo->query($requete); while($data=$rep-&g ...

Vue Websockets twofold

I am experiencing some issues with Laravel/Echo websockets and Vue.js integration. I have set up everything as required, and it works, but not quite as expected. The problem arises when I refresh the page and send a request - it displays fine. However, if ...

Contemplating the protection of an Android online platform

In the process of developing an Android app to connect to a http server, I have implemented a web service that sends JSON data to a PHP script on the server. This PHP script then accesses the desired database and inserts the JSON objects. However, my focu ...

"Troubleshooting issue: No response received when uploading files in VueJs3 with Laravel 8

Seeking assistance with a persistent issue that I have been unable to resolve despite trying various methods. Your help would be greatly appreciated. Below is my Vue template for creating categories: <form @submit.prevent="createCat" enctype= ...

Encountered an issue with JSON parsing: Expected an array but received a string at line 1, column 1 while transferring data from PHP

I am facing an issue with my code. I need to extract values from a PHP script that encodes a JSON array; My PHP code : <?php $roro = array(); $roro[] = array( 'id' => '1', 'title' => 'title1' ...

Transferring information from Android application to PHP server

I am currently running a PHP form on a WAMP server within a local network. However, when attempting to run the file, I encounter an error as shown in the screenshot. My goal is to send data from my Android app to the PHP form. Additionally, the Android app ...

Unable to verify identity using spa

My API is running on the URL: https://example.com, and my vue.js app is running on: https://app.example.com. I have configured the .env file as follows: SESSION_DOMAIN=.example.com SANCTUM_STATEFUL_DOMAINS=https://app.example.com The axios configuration i ...

Having trouble with Register/Login functionality in android/PHP?

Hello everyone, I have created a table on 000webhost which includes columns for id, name, username, age, and password. However, I am facing an issue where the username does not appear in the table when the code for registering is executed. I'm unsure ...