I'm running Meteor 2.3.5 on Ubuntu 20.04. I'm following the tutorial on Cordova: How to build mobile apps using Meteor's Cordova integration. , using the simple ToDo app from the official tutorial.
I believe that I have correctly installed JDK 16.02, Android Studio and Gradle.
When I run meteor run android
, the first part is successful:
meteor run android
[[[[[
/media/blackslate/316cbcf3-018d-4506-83b3-5666b5f788cd/blackslate/Repos/Meteor/Tutorial
]]]]]
=> Started proxy.
=> Started HMR server.
=> Started MongoDB.
Checking Java JDK and Android SDK versions |
ANDROID_SDK_ROOT=/home/blackslate/Android/Sdk (recommended setting)
ANDROID_HOME=/home/blackslate/Android/Sdk (DEPRECATED)
Using Android SDK: /home/blackslate/Android/Sdk
Starting app on Android Emulator |
> Connecting to Daemon
=> Started your app.
BUILD SUCCESSFUL in 1s
I then see a long series of warnings and mappings, similar to the following:
...
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
...
Finally, I see an error:
Build-tool 31.0.0 is missing DX at /home/blackslate/Android/Sdk/build-tools/31.0.0/dx
FAILURE: Build failed with an exception. /
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.
The following steps have not solved this problem:
- I opened Android Studio, clicked on the More Action link on the Projects pane and chose SDK Manager. This opens a window called Settings For New Projects.
- I deselected Android 12 Preview (S) 31 and Android 11.0 (R) 30, so that just Android 10.0 (Q) 29 is selected
- In a Terminal window, I ran
meteor remove-platform android
, thenmeteor add-platform android
- I ran
meteor run android
again, with the same results.
Searching Google for the string Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager. brings up sites like this, which give instructions on how to solve the problem if it occurs when you are working in your own Java project.
When working with Meteor 2.3.5, what steps can I take to solve this issue?