Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable android studio build in build_examples #10427

Merged
merged 3 commits into from
Oct 12, 2021

Conversation

andy31415
Copy link
Contributor

Problem

Android studio build is broken:

Cloudbuild artifact generation fails with:

2021-10-12 18:10:46 INFO    Adding /workspace/out/android-androidstudio-chip-tool/outputs/apk/debug/app-debug.apk into /workspace/artifacts/android-androidstudio-chip-tool.tar.gz/CHIPTool-debug.apk
Traceback (most recent call last):
  File "/workspace/./scripts/build/build_examples.py", line 213, in <module>
    main()
...
  File "/usr/lib/python3.9/tarfile.py", line 1842, in gettarinfo
    statres = os.lstat(name)
FileNotFoundError: [Errno 2] No such file or directory: '/workspace/out/android-androidstudio-chip-tool/outputs/apk/debug/app-debug.apk'
ERROR

VSCode build image fails with:

2021-10-12 18:25:01 WARNING > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
2021-10-12 18:25:01 WARNING    > 2 files found with path 'lib/armeabi-v7a/libCHIPController.so' from inputs:
2021-10-12 18:25:01 WARNING       - /workspaces/connectedhomeip/src/android/CHIPTool/app/build/intermediates/merged_jni_libs/debug/out
2021-10-12 18:25:01 WARNING       - /workspaces/connectedhomeip/src/android/CHIPTool/app/build/intermediates/cmake/debug/obj
2021-10-12 18:25:01 WARNING      If you are using jniLibs and CMake IMPORTED targets, see
2021-10-12 18:25:01 WARNING      https://developer.android.com/r/tools/jniLibs-vs-imported-targets
2021-10-12 18:25:01 WARNING 
2021-10-12 18:25:01 WARNING * Try:
2021-10-12 18:25:01 WARNING 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.

Further more the build seems to pollute the source directory and generates output into src/android/CHIPTool/build and src/android/CHIPTool/app/build even though the build_examples script is supposed to only generate files into its output directory.

Change overview

Disable the studio build version for android in build_examples.py.

Testing

Removal only. CI updated.

@todo
Copy link

todo bot commented Oct 12, 2021

android studio build is broken:

# TODO: android studio build is broken:
# - When compile succeeds, build artifact copy fails with "No such file or
# directory: '<out_prefix>/android-androidstudio-chip-tool/outputs/apk/debug/app-debug.apk'
# - Compiling locally in the vscode image fails with
# "2 files found with path 'lib/armeabi-v7a/libCHIPController.so'"
# yield target.Extend('androidstudio-chip-tool', board=AndroidBoard.AndroidStudio, app=AndroidApp.CHIP_TOOL)
ALL = []


This comment was generated by todo based on a TODO comment in aaadeca in #10427. cc @andy31415.

@andy31415 andy31415 added the hotfix urgent fix needed, can bypass review label Oct 12, 2021
@andy31415
Copy link
Contributor Author

@xylophone21 - this may need a revisit.

This needs to work at least in the vscode image: ./scripts/build/build_examples.py --enable-flashbundle --target-glob '*studio*' build --copy-artifacts-to ./out/artifacts

@andy31415 andy31415 merged commit add5a11 into project-chip:master Oct 12, 2021
@todo todo bot mentioned this pull request Oct 12, 2021
@andy31415 andy31415 deleted the remove_studio_build branch October 28, 2021 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotfix urgent fix needed, can bypass review scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant