question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android Studio] Errors after Capacitor update in Android Studio

See original GitHub issue

[X] I would to submit a bug or support question

Current behavior

I’m not sure if it’s a bug or just something I should ignore, but each time I update capacitor in my existing test project, build, copy and then open Android Studio I face the following errors (first error popup straight after Android Studio open, the other one after automatic build)

16.03.18 15:02 Unsupported Modules Detected: Compilation is not supported for following modules: assets-capacitor-android-plugins~1, capacitor-android-plugins. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.

15:02 Unsupported Modules Detected: Compilation is not supported for following modules: assets-capacitor-android-plugins~1, capacitor-android-plugins. Unfortunately you can’t have non-Gradle Java modules and Android-Gradle modules in one project.

15:02 Unregistered VCS root detected The directory /Users/me/Documents/projects/lab/capacitor-camera is under Git, but is not registered in the Settings. Add root Configure Ignore

15:03 Gradle sync started

15:03 Error Loading Project: Cannot load module assets-capacitor-android-plugins Details…

15:03 Platform and Plugin Updates: The following components are ready to update: Android Emulator, Google Play services

15:03 Project setup started

15:03 Gradle sync failed: java.lang.NullPointerException (41s 709ms)

android_studio_error_after_update

Expected behavior

No error I guess, but like I said, maybe I do something wrong

Current way to solve this

To solve this, each time I remove the “platform”

rm -r android

and then add it again

npx cap add android
npx cap sync
npx cap open android

Steps to reproduce

npm remove --save @capacitor/core @capacitor/cli
npm install --save @capacitor/core @capacitor/cli
ionic build --prod
npx cap copy
npx cap open android

p.s.: all the above steps are successful and produce no errors

Others informations


Gradle 4.6

Groovy: 2.4.12 Ant: Apache Ant™ version 1.9.9 compiled on February 2 2017 JVM: 1.8.0_60 (Oracle Corporation 25.60-b23) OS: Mac OS X 10.12.6 x86_64

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:46 (17 by maintainers)

github_iconTop GitHub Comments

55reactions
Brayan233commented, Nov 6, 2019

@SergioSuarezDev @krithikuntukad , i solved this issue by sync the project ( File -> Sync Project with gradle files) Hope it will help

28reactions
Niiitzercommented, Mar 26, 2020

None of the recommended solutions worked for me. Removing the /android/.idea folder did the job

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Android Issues | Capacitor Documentation
This error is often due to Gradle needing to be synced, something you'll need to do periodically after updating dependencies and changing project...
Read more >
Build error in Android Studio for Ionic/Capacitor project when ...
I came across an error building the app in Android Studio after I added a new package to the project. I've created a...
Read more >
Create and edit run/debug configurations - Android Developers
When you first create a project, Android Studio creates a default run/debug configuration for the main activity based on the Android App template....
Read more >
Android compile error after upgrade - No signature of method
When opening in Android Studio, I am getting the following error: Caused by: groovy.lang.MissingMethodException: No signature of method: ...
Read more >
Troubleshoot - Ionic 5 Full Starter App
Solution : Ionic capacitor update ... Twitter plugin error in Android Studio. import com.getcapacitor. ... To resolve, do one of the following.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found