Closed Bug 1544899 Opened 5 years ago Closed 5 years ago

Fennec build fails after installing AS/gradle updates (task with name bundleAppClassesWithoutGeckoBinariesDebug not found)

Categories

(Firefox Build System :: Android Studio and Gradle Integration, defect)

57 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1515248

People

(Reporter: kats, Unassigned)

References

(Blocks 1 open bug)

Details

Android Studio had updates, so I installed them. It also seems to have updated gradle to 4.10.2. And my ./mach build that was working just before this update-a-palooza is now broken.

$ ./mach build
 0:00.31 Clobber not needed.
 0:00.31 Adding make options from /home/kats/zspace/gecko-mobile/.mozconfig
    AUTOCLOBBER=1
    MOZ_OBJDIR=/home/kats/zspace/gecko-mobile/obj-android-x86-debug
    OBJDIR=/home/kats/zspace/gecko-mobile/obj-android-x86-debug
    FOUND_MOZCONFIG=/home/kats/zspace/gecko-mobile/.mozconfig
    export FOUND_MOZCONFIG
 0:00.32 /usr/bin/make -f client.mk -s
 0:00.45 Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:00.46 Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:00.49 Elapsed: 0.02s; From dist/xpi-stage: Kept 63 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:00.64 Elapsed: 0.08s; From dist/bin: Kept 965 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:00.70 Elapsed: 0.15s; From _tests: Kept 1151 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:00.87 Elapsed: 0.41s; From dist/include: Kept 5644 existing; Added/updated 0; Removed 0 files and 0 directories.
 0:01.01 mobile/android/base/android_apks.stub
 0:01.60  0:00.43 /home/kats/zspace/gecko-mobile/gradlew geckoview:generateJNIWrappersForGeneratedWithGeckoBinariesDebug app:generateJNIWrappersForFennecWithoutGeckoBinariesDebug app:assembleWithoutGeckoBinariesDebug app:assembleWithoutGeckoBinariesDebugAndroidTest -x lint
 0:01.62 Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=utf-8
 0:02.53 Parallel execution is an incubating feature.
 0:02.79 > Configure project :app
 0:02.79 WARNING: API 'variant.getPreBuild()' is obsolete and has been replaced with 'variant.getPreBuildProvider()'.
 0:02.79 It will be removed at the end of 2019.
 0:02.79 For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
 0:02.80 To determine what is calling variant.getPreBuild(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
 0:02.80 WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
 0:02.80 It will be removed at the end of 2019.
 0:02.80 For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
 0:02.80 To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
 0:02.80 FAILURE: Build failed with an exception.
 0:02.80 * Where:
 0:02.80 Script '/home/kats/zspace/gecko-mobile/mobile/android/gradle/with_gecko_binaries.gradle' line: 142
 0:02.80 * What went wrong:
 0:02.80 A problem occurred configuring project ':app'.
 0:02.80 > org.gradle.api.UnknownTaskException: Task with name 'bundleAppClassesWithoutGeckoBinariesDebug' not found in project ':app'.
 0:02.80 * Try:
 0:02.80 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.
 0:02.80 * Get more help at https://help.gradle.org
 0:02.80 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
 0:02.80 Use '--warning-mode all' to show the individual deprecation warnings.
 0:02.80 See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings
 0:02.80 BUILD FAILED in 1s
 0:02.82 Traceback (most recent call last):
 0:02.82   File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
 0:02.82     "__main__", fname, loader, pkg_name)
 0:02.82   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
 0:02.82     exec code in run_globals
 0:02.82   File "/home/kats/zspace/gecko-mobile/python/mozbuild/mozbuild/action/file_generate.py", line 120, in <module>
 0:02.82     sys.exit(main(sys.argv[1:]))
 0:02.82   File "/home/kats/zspace/gecko-mobile/python/mozbuild/mozbuild/action/file_generate.py", line 71, in main
 0:02.83     ret = module.__dict__[method](output, *args.additional_arguments, **kwargs)
 0:02.83   File "/home/kats/zspace/gecko-mobile/mobile/android/gradle.py", line 41, in assemble_app
 0:02.83     return android('assemble-app')
 0:02.83   File "/home/kats/zspace/gecko-mobile/mobile/android/gradle.py", line 33, in android
 0:02.83     subprocess.check_call(cmd)
 0:02.83   File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
 0:02.83     raise CalledProcessError(retcode, cmd)
 0:02.83 subprocess.CalledProcessError: Command '['/home/kats/zspace/gecko-mobile/obj-android-x86-debug/_virtualenvs/init/bin/python', u'/home/kats/zspace/gecko-mobile/mach', 'android', 'assemble-app']' returned non-zero exit status 1
 0:02.83 backend.mk:64: recipe for target '.deps/android_apks.stub' failed
 0:02.83 make[4]: *** [.deps/android_apks.stub] Error 1
 0:02.83 /home/kats/zspace/gecko-mobile/config/recurse.mk:101: recipe for target 'mobile/android/base/export' failed
 0:02.83 make[3]: *** [mobile/android/base/export] Error 2
 0:02.83 /home/kats/zspace/gecko-mobile/config/recurse.mk:32: recipe for target 'export' failed
 0:02.84 make[2]: *** [export] Error 2
 0:02.84 /home/kats/zspace/gecko-mobile/config/rules.mk:400: recipe for target 'default' failed
 0:02.84 make[1]: *** [default] Error 2
 0:02.84 client.mk:125: recipe for target 'build' failed
 0:02.84 make: *** [build] Error 2
 0:02.88 259 compiler warnings present.

You can't update the Android-Gradle plugin without also updating the things built on the plugin. Roll back your build.gradle files in your tree.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE

Thanks!

More concretely for anybody else who runs into this:

  • close Android Studio
  • git checkout -- build.gradle in the tree to reset the changes that the upgrade caused
  • reopen Android Studio, and this time say no to the upgrade
Product: Firefox for Android → Firefox Build System
You need to log in before you can comment on or make changes to this bug.