Fixed
Status Update
Comments
gr...@squareup.com <gr...@squareup.com> #2
EDIT: Hold on, I think my test is invalid. I'll reply with another comment with attached logs if I can repro it. I'm testing it again. Apologies for the confusion.
ORIGINAL COMMENT:
Hmm I'm not able to reproduce this anymore. I'm not sure what changed. Maybe the old build cache caused some issues. But after doing a clean & build, I am not seeing this.
Feel free to close this issue, if it happens again I'll let you know.
ORIGINAL COMMENT:
Hmm I'm not able to reproduce this anymore. I'm not sure what changed. Maybe the old build cache caused some issues. But after doing a clean & build, I am not seeing this.
Feel free to close this issue, if it happens again I'll let you know.
vs...@google.com <vs...@google.com>
cm...@google.com <cm...@google.com> #3
Yep, I'm still able to reproduce the issue. Sorry for the confusion. Attached are my build logs (with `--info` and `--debug` enabled in compiler options). I also attached the idea logs directory.
cm...@google.com <cm...@google.com> #4
These steps don't reproduce the issue for me:
(1) Create new C++ project
(2) Paste snippet from comment #1 into app\build.gradle
(3) Select fullDebug variant and x86 ABI
(3) Delete app\build and app\.cxx folders (to be sure there's no leftovers)
(4) Using x86 emulator...
(5) Run -> Run 'app'
(6) From shell:
macbookpro:MyApplication112 jomof$ find . -name *.o
./app/.cxx/cmake/fullDebug/x86/CMakeFiles/native-lib.dir/native-lib.cpp.o
macbookpro:MyApplication112 jomof$ find . -name *.so
./app/build/intermediates/cmake/fullDebug/obj/x86/libnative-lib.so
./app/build/intermediates/merged_native_libs/fullDebug/out/lib/x86/libnative-lib.so
./app/build/intermediates/stripped_native_libs/fullDebug/out/lib/x86/libnative-lib.so
I do see a couple spurious warnings at step (6) :
Cannot build selected target ABI: x86, no suitable splits configured: armeabi-v7a;
ABIs [x86] set by 'android.injected.build.abi' gradle flag contained 'X86' not targeted by this project.
But I think these are ignorable for this purpose.
(1) Create new C++ project
(2) Paste snippet from
(3) Select fullDebug variant and x86 ABI
(3) Delete app\build and app\.cxx folders (to be sure there's no leftovers)
(4) Using x86 emulator...
(5) Run -> Run 'app'
(6) From shell:
macbookpro:MyApplication112 jomof$ find . -name *.o
./app/.cxx/cmake/fullDebug/x86/CMakeFiles/native-lib.dir/native-lib.cpp.o
macbookpro:MyApplication112 jomof$ find . -name *.so
./app/build/intermediates/cmake/fullDebug/obj/x86/libnative-lib.so
./app/build/intermediates/merged_native_libs/fullDebug/out/lib/x86/libnative-lib.so
./app/build/intermediates/stripped_native_libs/fullDebug/out/lib/x86/libnative-lib.so
I do see a couple spurious warnings at step (6) :
Cannot build selected target ABI: x86, no suitable splits configured: armeabi-v7a;
ABIs [x86] set by 'android.injected.build.abi' gradle flag contained 'X86' not targeted by this project.
But I think these are ignorable for this purpose.
gr...@squareup.com <gr...@squareup.com> #6
I am still seeing this but oddly on only one of my projects:
```
> Task :ZPayService:externalNativeBuildFullDebug
Build ZPayService_x86
ninja: Entering directory `E:\code\zps\source\ZPayService\.cxx\cmake\fullDebug\x86'
[1/45] Copying third party binaries
[2/45] Linking CXX static library output\lib\libZPayUtilities.a
[3/45] Linking CXX static library output\lib\libWallet.a
[4/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/Packets/StartTransaction/StartTransactionCommand.cpp.o
...
[33/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/Protocol/Kizi.cpp.o
```
> Task :ZPayService:externalNativeBuildFullDebug
Build ZPayService_x86
ninja: Entering directory `E:\code\zps\source\ZPayService\.cxx\cmake\fullDebug\x86'
[1/45] Copying third party binaries
[2/45] Linking CXX static library output\lib\libZPayUtilities.a
[3/45] Linking CXX static library output\lib\libWallet.a
[4/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/Packets/StartTransaction/StartTransactionCommand.cpp.o
...
[33/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/Protocol/Kizi.cpp.o
> Task :ZPayService:externalNativeBuildFullDebug
[34/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/Vas/Google/GoogleVasApplication.cpp.o
...
[43/45] Building CXX object ZPayService/Interface/CMakeFiles/ZPayServiceInterface.dir/Source/ZPay/ZPayServer.cpp.o
[44/45] Linking CXX static library output\lib\libZPayServiceInterface.a
[45/45] Linking CXX shared library ..\..\..\..\build\intermediates\cmake\fullDebug\obj\x86\libZPayService.so
Build ZPayService_armeabi-v7a
ninja: Entering directory `E:\code\zps\source\ZPayService\.cxx\cmake\fullDebug\armeabi-v7a'
[0/1] Re-running CMake...
```
Notice how it says `Build ZPayService_x86` then `Build ZPayService_armeabi-v7a`? I have an x86 device selected in the drop down at the top right next to the run configuration selection. I enabled `--info --debug` in compiler options and rebuilt from scratch. Please see attached logs.
Description
Build Info:
Gradle version: 4.9
Android Plugin Version: 3.2.1
Module Compile Sdk Version: 27
Module Build Tools Version: 28.0.3
Android SDK Tools version: 26.1.1
Bad commit:
Bad line:
Proposed change: The return value of adding the dependency to the keptComponents set should be used to determine if we've already visited this node. If we have, we should not traverse the node's children again.
Suggested Patch:
private fun collect(
keptComponents: MutableSet<ComponentIdentifier>,
item: ResolvedDependencyResult) {
- keptComponents.add(
- for (dependency in item.selected.dependencies) {
- collect(keptComponents, dependency as ResolvedDependencyResult)
+ if (keptComponents.add(
+ for (dependency in item.selected.dependencies) {
+ collect(keptComponents, dependency as ResolvedDependencyResult)
+ }
}
}