Building Meteor app to Android device

After the success building of the Meteor app to Android and during upload the app to Google Play, I get’s the following error:

Your app currently targets API level 30 and must target at least API level 31 to ensure that it is built on the latest APIs optimised for security and performance. Change your app's target API level to at least 31.

And when I will chenge the SDK vrom version 30 to 31, I’m not able to build the app, because the error occured during the building process:

No installed build tools found. Install the Android build tools version 30.0.3 or higher.

Is it possible somewhere in Meteor change the version of SDK to accept installed SDK 31?

Thanks a lot.

Hello @klaucode, for a more detailed explanation/issue, click here this will be solved on 2.8. There is a workaround that I think may help you (I’m quoting what was said here)
add this to your mobile-config.js within App.appendToConfig

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android.com/apk/res/android">
    <activity android:exported="true"></activity>
</edit-config>

Then make sure that both Java 11 and latest cmdline-tools are set on the PATH for Meteor to use them.

Hello @klaucode, for a more detailed explanation/issue, click here this will be solved on 2.8. There is a workaround that I think may help you (I’m quoting what was said here)
add this to your mobile-config.js within App.appendToConfig

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android.com/apk/res/android">
    <activity android:exported="true"></activity>
</edit-config>

Then make sure that both Java 11 and latest cmdline-tools are set on the PATH for Meteor to use them.

Hello @grubba, thank you very much for your help. I found this information, but I dont know, how to correctly use the appendToConfig, I tried following:

App.appendToConfig(`
    <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android.com/apk/res/android">
        <activity android:exported="true"></activity>
    </edit-config>
`);

App.appendToConfig(`
  <universal-links>
     <host name="localhost:8080" />
   </universal-links>
 `);

and also following:


App.appendToConfig(`
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android.com/apk/res/android">
        <activity android:exported="true"></activity>
    </edit-config>
  <universal-links>
     <host name="localhost:8080" />
   </universal-links>
 `);

* What went wrong:
A problem occurred evaluating script.
> No installed build tools found. Install the Android build tools version 30.0.3 or higher.

* 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.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings


…with SDK30 works, with SDK31 not… :frowning: