[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)

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:
- Created 6 years ago
- Reactions:5
- Comments:46 (17 by maintainers)
@SergioSuarezDev @krithikuntukad , i solved this issue by sync the project ( File -> Sync Project with gradle files) Hope it will help
None of the recommended solutions worked for me. Removing the /android/.idea folder did the job