Reputation: 153
My angular ionic application was working fine on Android platform before updating capaitor to version 3. After I update to Version3 I got this error whe I try to run my app on the emulator from Android studio
C:\ionic\dhaman-customer-service\node_modules@capacitor\storage\android\src\main\java\com\capacitorjs\plugins\storage\StoragePlugin.java:8: error: package com.getcapacitor.annotation does not exist import com.getcapacitor.annotation.CapacitorPlugin; ^ I am using Storage plugin in my application
The following is the out put of npx cap doctor command Latest Dependencies:
@capacitor/cli: 2.4.7 @capacitor/core: 2.4.7 @capacitor/android: 2.4.7 @capacitor/ios: 2.4.7
Installed Dependencies:
@capacitor/ios: not installed @capacitor/cli: 3.0.0-rc.0 @capacitor/android: 2.4.7 @capacitor/core: 3.0.0-rc.0
[success] Android looking great! 👌
Upvotes: 4
Views: 6052
Reputation: 1
The problem is solved by installing the same versions of the ionic dependencies, for example if I have installed "@capacitor/cli": "4.1.0" the rest must also have the same version "@capacitor/cli": "4.1.0" , "@capacitor/core": "4.1.0", "@capacitor/ios": "4.1.0",
Upvotes: 0
Reputation: 348
To add more to the question and answer, I was getting error after upgrading to Ionic 7: com.getcapacitor.util.InternalUtils not found. I just did npm install @capacitor/android@latest
and its all cool.
Capacitr 4.8 Ionic 7, Gradle 7.2
Upvotes: 0
Reputation: 188
Install npm install @capacitor/android
this will install the latest public version, check https://www.npmjs.com/package/@capacitor/android?activeTab=versions
Upvotes: 1
Reputation: 153
problem fixed after Upgrading capacitor/android to version 3 beta
npm install @capacitor/[email protected]
Upvotes: 7