У меня проблемы с запуском робоэлектрического теста в Android
<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="8dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/nav_graph" />
Я использую компонент архитектуры навигации
Я получаю просмотр исключения инфляции
ниже мой журнал ошибок
android.view.InflateException: XML file C:\Users\StudioProjects\app\build\intermediates\merged-not-compiled-resources\debug\layout\activity_main.xml line #-1 (sorry, not yet implemented): XML file C:\Users\StudioProjects\app\build\intermediates\merged-not-compiled-resources\debug\layout\activity_main.xml line #-1 (sorry, not yet implemented): Error inflating class fragment Caused by: android.view.InflateException: XML file C:\Users\jitendrakumar\StudioProjects\app\build\intermediates\merged-not-compiled-resources\debug\layout\activity_main.xml line #-1 (sorry, not yet implemented): Error inflating class fragment
Caused by: android.content.res.Resources$NotFoundException: packagename:navigation/nav_graph
at org.robolectric.shadows.ShadowLegacyAssetManager.loadXmlResourceParser(ShadowLegacyAssetManager.java:591)
at org.robolectric.shadows.ShadowResources.loadXmlResourceParser(ShadowResources.java:205)
at android.content.res.Resources.loadXmlResourceParser(Resources.java)
at android.content.res.Resources.getXml(Resources.java:1206)
at androidx.navigation.NavInflater.inflate(NavInflater.java:67)
at androidx.navigation.NavController.setGraph(NavController.java:424)
at androidx.navigation.NavController.setGraph(NavController.java:406)
at androidx.navigation.fragment.NavHostFragment.onCreate(NavHostFragment.java:226)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2414)
Я уже включил
android.useAndroidX=true
android.enableJetifier=true