This message was deleted.
# community-support
s
This message was deleted.
v
Can you knit this together to an MCVE? 🙂
👍 2
m
Here you go. You should be able to import that into Android Studio (I used Giraffe Beta). It should work straight away after Gradle Sync. Android Studio will recognize both configurations and show options to run
microapps.mylibraryapp
or
<http://androidapp.app|androidapp.app>
but only
<http://androidapp.app|androidapp.app>
works.
v
I'm sorry, I'm not an Android developer and have not and will not install Giraffe. I though downgraded the AGP version to a version compatible with my IJ version. There
microapps.mylibraryapp
runs fine on the emulator.
<http://androidapp.app|androidapp.app>
though fails to build.
Maybe you can share build `--scan`s of your tries.
m
Understandably. But if you observed the same issue on IJ then it’s probably an issue with Gradle rather than AS. I’ve tried downgrading to Gradle 7.6 and the behavior changed. I could run
microapps.mylibraryapp
from the IDE. I don’t see how I could how with
--scan
if gradle fails to find the task?
Copy code
Cannot locate tasks that match ':microapps:mylibraryapp:assembleDebug' as project 'microapps' not found in root project 'GradleMismatch'.
v
But if you observed the same issue on IJ
I did not. Unless your description was wrong.
then it’s probably an issue with Gradle rather than AS.
Why? AS is just a customized IJ.
I’ve tried downgrading to Gradle 7.6 and the behavior changed.
Hm, bad, then I cannot help, maybe someone else can.
I don’t see how I could how with
--scan
if gradle fails to find the task?
--scan
should almost always work.
m
I’m sorry, I misinterpreted your results. You managed to get it working, which IJ version are you using? I tried with IJ 2023.1 and the error message is different:
Copy code
Cannot locate tasks that match ':androidApp:microapps:mylibraryapp:assembleDebug' as project 'androidApp' not found in root project 'microapps'.
It’s searching for the correct path
:androidapp:microapps:mylibraryapp:
but in the wrong root project.
--scan
should almost always work.
It doesn’t when I try to run this specific task, just errors the same as before, since it doesn’t exist. Unless there’s another task I can run with
--scan
v
You managed to get it working,
Well, the one you said is not working worked, the one you said working did not build
which IJ version are you using
2022.2.3
It’s searching for the correct path
:androidapp:microapps:mylibraryapp:
but in the wrong root project.
If you have multiple builds imported and want to run that task path in a specific build, you have to select which build, depending on how you run the task. For example in the "Run Anything" dialog (
Ctrl-Ctrl
) you can select the execution context in the upper left.