找不到类' android.app.Application $ OnProvideAssistDataListener'

时间:2016-04-29 05:27:24

标签: android android-activity dialog

我正在使用android studio 2.1。当我运行应用程序时,我遇到了这种类型的错误。

Stream.of(flights)
        .map(f -> f.getLocations(response))
        .filter(f -> f != null)
        .forEach(System.out::println);

我怎样才能解决这个错误?

2 个答案:

答案 0 :(得分:2)

see this。 我也遇到过这个问题,解决方法如下: 首先禁用“InstantRun”功能,然后单击“文件”菜单中的“无效缓存/重启”,在重建之前卸载手机或模拟器中的apk即可。然后没有这样的错误。事实上,这些错误对apk没有任何影响。

答案 1 :(得分:0)

您遇到此问题是因为您正在尝试仅从API级别21提供的方法。问题是因为更改为compileSdkVersion 22&将build.gradle更新为 编译'com.android.support:appcompat-v7:22.0.0'

相关问题