Publication issue

Help! I received a notification from the Play Store to update the target API level before August 31st. We updated the app preference to 34 .
App.setPreference(‘android-targetSdkVersion’, ‘34’);
App.setPreference(‘android-minSdkVersion’, ‘22’)
And now we are unable to build the app.
Meteor version: 2.5.3
JDK version: 11.0.14
Gradle version 6.6.1
We are encountering the following error.

W20240826-14:28:04.789(5.5)? (STDERR) (Use `node --trace-warnings ...` to show where the warning was created)
=> Started your app.                          
                                              
=> App running at: http://localhost:3000/     

> Configure project :app
WARNING:: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.
WARNING:: Using flatDir should be avoided because it doesn't support any meta-data formats.
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
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
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/04 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
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
Warning: unexpected element (uri:"", local:"extension-level"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
Warning: unexpected element (uri:"", local:"base-extension"). Expected elements are <{}codename>,<{}layoutlib>,<{}api-level>
<=============> 100% CONFIGURING [255ms]

> Task :CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
   > AAPT2 aapt2-4.2.2-7147631-linux Daemon #0: Unexpected error during link, attempting to stop daemon.
     This should not happen under normal circumstances, please file an issue if it does.

* 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

BUILD FAILED in 3s
44 actionable tasks: 44 executed
=> Errors executing Cordova commands:         
                                              
   While running Cordova app for platform Android with options
   --buildConfig,/home/Projects/project/code/.meteor/local/cordova-build/build.json,--device:
   Error: Command failed with exit code 1: /home/Projects/project/code/.meteor/local/cordova-build/platforms/android/gradlew
   cdvBuildDebug -b /home/Projects/project/code/.meteor/local/cordova-build/platforms/android/build.gradle
   at makeError (/home/Projects/project/code/.meteor/local/cordova-build/node_modules/execa/lib/error.js:60:11)
   at handlePromise (/home/Projects/project/code/.meteor/local/cordova-build/node_modules/execa/index.js:118:26)
   at processTicksAndRejections (internal/process/task_queues.js:95:5)
   => awaited here:
   at Function.Promise.await
   (/home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)
   at /tools/cordova/project.js:344:7
   at
   /home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
   => awaited here:
   at Function.Promise.await
   (/home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)
   at CordovaProject.runCommands (/tools/cordova/project.js:896:22)
   at /tools/cordova/project.js:342:10
   at
   /home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40
                                              
/home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^
ExitWithCode {
  code: 1,
  stack: 'undefined\n' +
    ' => awaited here:\n' +
    '    at Function.Promise.await (/home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)\n' +
    '    at /tools/cordova/run-targets.js:109:5\n' +
    '    at /home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/fiber_pool.js:43:40\n' +
    ' => awaited here:\n' +
    '    at Function.Promise.await (/home//.meteor/packages/meteor-tool/.2.5.3.1gl830.lr3vw++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/meteor-promise/promise_server.js:56:12)\n' +
    '    at /tools/cordova/runner.js:98:17\n' +
    '    at Object.capture (/tools/utils/buildmessage.js:283:5)\n' +
    '    at CordovaRunner.startRunTargets (/tools/cordova/runner.js:97:37)\n' +
    '    at AppRunner._runOnce (/tools/runners/run-app.js:778:21)\n' +
    '    at AppRunner._fiber (/tools/runners/run-app.js:949:28)\n' +
    '    at /tools/runners/run-app.js:410:12'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@aneesh007

I use pwabuilder, and updated this way. Same forum post also has info about Cordova.

1 Like

What plugins do you use, and which version of Meteor are you on?

We’re finishing up the upgrade to Cordova and related libraries for the next version, 3.0.3. The tests are going well, and developers have successfully built their apps with SDK 34, even without the Cordova upgrade, and even with store verification. However, we want to explore all scenarios in case there’s an urgent need for a Cordova upgrade for Meteor 2 caused by specific plugin usage or related.

Could you provide more details about your setup? A small reproduction repository would be ideal for us to investigate further. I plan to test further the Cordova upgrade next.

Thank you

Please once you upgrade Cordova release a new beta so we can try it out ASAP.

Meteor version - 2.5.3

Cordova-plugins

cordova-plugin-android-permissions@1.1.5
cordova-plugin-app-launcher@0.4.0
cordova-plugin-appinfo-sync@0.2.0
cordova-plugin-camera@GitHub - felicienfrancois/cordova-plugin-camera: Apache Cordova Plugin camera
cordova-plugin-device@2.0.3
cordova-plugin-qr-barcode-scanner@8.0.3

We discovered that the cordova package named cordova-plugin-qr-barcode-scanner@8.0.3 is causing the issue, and it is currently not being maintained. Additionally, two other suggested packages are not compatible with Android SDK 34: 1. phonegap/phonegap-plugin-barcodescanner 2. bitpay/cordova-plugin-qrscanner.

Thank you for your replay@xet7

1 Like