Im using Dagger Hilt in my project and its not compilating. Checked everything in manifest and project files and have no idea what is happenning :/
JavaScript
x
error: annotation @AggregatedRoot is missing a default value for the element 'originatingRoot'
@AggregatedRoot(
^warning: File for type 'com.example.mikebamb.EquipmentsApplication_HiltComponents' created in the last round
will not be subject to annotation processing.warning: File for type 'dagger.hilt.internal.processedrootsentinel.codegen._com_example_mikebamb_EquipmentsApplication'
created in the last round will not be subject to annotation processing.
> Task :app:kaptDebugKotlin FAILED
EquipmentsApplication Cass
JavaScript
@HiltAndroidApp
class EquipmentsApplication : Application()
Main Activity
JavaScript
@AndroidEntryPoint
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
Manifest File
JavaScript
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mikebamb">
<application
android:name="com.example.mikebamb.EquipmentsApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MikeBamb">
<activity android:name=".presenter.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Advertisement
Answer
For some reason my versions of the implementation were not matching
Old Version
JavaScript
implementation 'com.google.dagger:hilt-android:2.36'
kapt 'com.google.dagger:hilt-compiler:2.35.1'
Rolled back to
JavaScript
implementation 'com.google.dagger:hilt-android:2.35'
kapt 'com.google.dagger:hilt-compiler:2.35'