Following the guide on the github page I:
added to parent project build.gradle
:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' <---
}
added to my app build.gradle
:
apply plugin: 'com.neenbedankt.android-apt'
...
compile 'com.airbnb:deeplinkdispatch:3.0.0'
apt 'com.airbnb:deeplinkdispatch-processor:3.0.0'
Created a module class and annotated it:
@DeepLinkModule
public class AppDeepLinkModule
{
}
Now when I try to build it displays the above error message:
Error:(12, 82) error: incompatible types: List<Object> cannot be converted to List<DeepLinkEntry>
He then points me to this class, which is autogenerated:
public final class AppDeepLinkModuleLoader implements Parser {
public static final List<DeepLinkEntry> REGISTRY = Collections.unmodifiableList(Arrays.asList(
)); <-- this line here
@Override
public DeepLinkEntry parseUri(String uri) {
for (DeepLinkEntry entry : REGISTRY) {
if (entry.matches(uri)) {
return entry;
}
}
return null;
}
}
I mentioned their sample application and mine seems to be identical. Here is a link to their class that does the same.
I followed further steps until I needed to use the autogenerated class if that would be a problem, but that didn't help either. AndroidManifest.xml
:
<activity
android:name=".deeplink.DeepLinkActivity"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="slackwebsocket"
android:scheme="http"/>
</intent-filter>
</activity>
DeepLinkActivity
:
@DeepLinkHandler({AppDeepLinkModule.class})
public class DeepLinkActivity extends AppCompatActivity
{
@Override
protected void onCreate(@Nullable Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
}
}
How to fix it?