Andrew Fletcher published: 8 September 2023 (updated) 9 September 2023 1 minute read
Updating the Android app and while testing I'm seeing the following error in the AndroidManifest.xml file
Class referenced in the manifest, `com.{app_name}.app.MainActivity`, was not found in the project or the libraries
And the accompanying error
Unresolved class 'MainActivity'
Working through the suggestions
-
Invalidate caches
To invalidate the caches do the following
File > Invalidate caches / restart
Outcome: error remained
2. Restart Android Studio
Another suggestion was to restart Android Studio. Technically invalidating the caches incorporates a restart. But following process, I'll test. Expecting no change.
Outcome: error remained
3. Deleting the android directory
Time to delete the android directory and rebuild it.
Begin by deleting the current android directory.
rm -rf android
Add the Android platform.
npx cap add android
Now rebuild the Android code base
npm run build && npx cap sync && npx cap copy android && npx cap open android
Or you can read more details from - Launching app code in a simulator like Xcode or Android Studio
Related articles
Andrew Fletcher
•
31 Oct 2023
Android icon not changing
If the Android app icon is not changing from the default icon (in my situation this was the Capacitor icon), here are some steps to troubleshoot and resolve the issue: Check the Icon FilesEnsure that you have provided the correct icon files in the appropriate directory. In a Capacitor project,...
Andrew Fletcher
•
27 Oct 2023
Working through android.permission.REQUEST_INSTALL_PACKAGES blocking releases
I'm receiving an issue with a previous release on Google Playandroid.permission.REQUEST_INSTALL_PACKAGESI'm seeing the following message in Google PlayRequest install packages permission
error - Not started - Your app isn't compliant
A permission that allows your app to install packages. If your...
Andrew Fletcher
•
25 Oct 2023
keytool error: java.io.IOException: keystore password was incorrect
The "keystore password was incorrect" error in keytool indicates that the password you provided when trying to access or modify a keystore is incorrect. To resolve this issue, you can follow these steps: Verify the Correct PasswordDouble-check that you are entering the correct password for the...