Status Update
Comments
vi...@google.com <vi...@google.com>
xo...@google.com <xo...@google.com>
sp...@google.com <sp...@google.com>
sp...@google.com <sp...@google.com> #2
Can you create a toy repro project and upload it here?
Do you get the same error if you try with AGP 7.2.0-beta01
?
sp...@google.com <sp...@google.com> #3
Revisiting this, I don't think AGP is the one generating those java files.
Ian, is the navigation safe args gradle plugin generating those java files?
il...@google.com <il...@google.com> #4
Support for this has already been added in
mo...@gmail.com <mo...@gmail.com> #5
This issue still exists in 2.5.0-beta01
.
In particular, when we add an applicationIdSuffix to a build variant
sp...@google.com <sp...@google.com> #6
Re: #5, the issue is that the navigation-safe-args-gradle-plugin
is incorrectly using the applicationId
instead of the namespace
to namespace the R class. There's an internal bug tracking this (
Description
Example error:
C:\Users\clare\SSC-Android\app\build\generated\source\navigation-args\debug\com\savant\ssc\ui\delivery\DeliveryItemsFragmentDirections.java:19: error: package R does not exist
return new ActionOnlyNavDirections(R.id.action_fragment_delivery_items_to_newDeliveryFragment);
Adding the package name back to the manifest file resolves the error.
Build: AI-212.5457.46.2112.8094850, 202201192057,
AI-212.5457.46.2112.8094850, JRE 11.0.12+7-b1504.28-7817840x64 JetBrains s.r.o, OS Windows 10(amd64) v10.0 , screens 1920.0x1080.0
AS: Chipmunk | 2021.2.1 Beta 1; Kotlin plugin: 212-1.6.10-release-923-AS5457.46; Android Gradle Plugin: 7.1.0; Gradle: 7.2; Gradle JDK: version 11.0.12; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
IMPORTANT: Please read