I’m unable to build my app for Android.
I write code. I’m not familiar with all the exotics around which version of what command line app needs to run at what time, or step. So, I’m reduced to following instructions.
Google tells me that my app store apps need to be upgraded to target a newer SDK version. So, trying to achieve this, here’s my shopping list of problems.
When I try to run meteor update
, I am presented with this:
Error: incorrect data check
at Zlib.zlibOnError [as onerror] (zlib.js:187:17)
=> awaited here:
at Promise.await (/Users/{{me}}/.meteor/packages/meteor-tool/.2.13.0.1iwqaqu.34uuk++os.osx.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:60:12)
…
meteor --version
tells me I’m at 2.5.1.
However, I don’t necessarily need to run the latest version. So, I just try meteor build --server=http://localhost:3000 ../../first
.
This does a lot of crunching, but fails with notices including…
FAILURE: Build failed with an exception. -
Building Cordova app for Android \
- What went wrong:
Execution failed for task ‘:app:processReleaseMainManifest’.
Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not “opens java.io” to unnamed module @187a9d9
- Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
- Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
But, running with --stacktrace tells me it’s an ‘unknown option’.
Googling suggests I’m dealing with some Java issue. I install java 16 and add lines to .zshrc. This, so that echo $JAV_HOME
now gets me:
/Library/Java/JavaVirtualMachines/jdk-16.0.1.jdk/Contents/Home
This folder exists on my machine.
But, the build still fails after that.
I then turn to a build process that involves Android Studio, as mentioned here:
I used this in the past, but this process fails early on, as “Generate Signed Bundle / APK” is not an option under “Build” for me.
Then I figure I should go back to the source, at:
So, I run meteor install-sdk android
. This tells me to look at:
This leads to brew install gradle
, which leads to:
Cannot install in Homebrew on ARM processor in Intel default prefix
Which leads to brew bundle dump
, which finishes without a notification. Did that do the trick? I earlier had an issue around Gradle. So… maybe?
Running the build again, I get the same error as before. So, maybe not.
So now I just throw /opt/homebrew in the bin, and try to brew install gradle
again. But this gives me the same error. I look at ““Alternative Installs” from: Installation — Homebrew Documentation”, but this is abracadabra to me.
I try to uninstall homebrew, which resulted in “Homebrew partially uninstalled (but there were steps that failed)!”.
I install Homebrew again. This works.
I run brew install gradle
again. This works.
I try my build again. But the failure is the same:
FAILURE: Build failed with an exception. \
- What went wrong:
Execution failed for task ‘:app:processReleaseMainManifest’.
Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not “opens java.io” to unnamed module @187a9d9
- Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.
- Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
I just want an APK. Or that fancy new package format (aab?).
What do I need to do to make this happen?