Issue running Meteor.js Android App on Mac M1


  • Operating System: Mac M1 Ventura 13.0
export JAVA_HOME="/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=${PATH}:${ANDROID_HOME}/emulator
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools


android-targetSdkVersion 31

Installed Packages

  • Gradle 7.5.1
  • Android SDK Build Tools 34.0.0-rc4
  • Android SDK Command Line Tools 9.0
  • Android Emulator 32.1.12
  • Android SDK Platform-Tools 34.0.1
> Task :CordovaLib:compileDebugJavaWithJavac FAILED
An exception has occurred in the compiler (1.8.0_332). Please file a bug against the Java compiler via the Java bug reporting page ( after checking the Bug Database ( for duplicates. Include your program and the following diagnostic in your report. Thank you.pp on Android Emulator          /
java.lang.AssertionError: annotationType(): unrecognized Attribute name MODULE (class$NameImpl)


I’m trying to run my Meteor.js Android app using the meteor run android command on Mac M1, but I’m encountering errors. I have set up the necessary environment variables, installed the required packages and tools, but I’m still getting an error when compiling the app with CordovaLib:compileDebugJavaWithJavac.

The error message indicates an issue with the Java compiler. Specifically, the error message suggests that the MODULE attribute is unrecognized by the compiler. I’m unsure how to resolve this error, and I would appreciate any assistance in resolving this issue.

When I researched the error above, I saw a few places that said I should use java 1.11 above and I tried it, and in this case I am getting the error below.

Your system does not yet seem to fulfill all requirements to build apps for Android.
Please follow the installation instructions in the mobile guide:
Status of the individual requirements:        
✓ Java JDK                                    
✓ Android SDK                                 
✗ Android target: Command failed with exit code 1: avdmanager list target
            Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
            Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
                at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(
                at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(
                at java.base/java.lang.ClassLoader.loadClass(
                ... 5 more
✓ Gradle 

Solution note for friends who have problems like me:

It was due to the cordova plugin that I did not mention above and escaped my attention.


What was the solution to resolve that plugin in the end, was it an upgrade, replacement or removal?

Actually I was not able to run cordova-plugin-qrscanner@2.6.0 package with andorid api 31. I tried the phonegap-plugin-barcodescanner@8.0.1 packages. The room did not work directly with api 31. It is necessary to edit the manifest file (android:exported=true|false). I tried my tests with api 30 and was able to run it successfully. phonegap-plugin-barcodescanner@8.0.1 I’ve seen edited forks of this package but I don’t know how to install local cordova package in Meteor. I need to research this.