BaseFragmentActivityApi16.startActivityForResult(intent, int, Bundle) throwing error when targeting Android O

Viewed 3250

I started targeting android O in my project I get an error when calling startActivityForResult(intent, int, Bundle) with the error saying it can only be called from group id com.android.support.

Gradle:

compile 'com.android.support:design:26.0.0'
compile 'com.android.support:cardview-v7:26.0.0'
compile 'com.android.support:support-v13:26.0.0'
3 Answers

Use this in build.gridle

android { lintOptions { disable 'RestrictedApi' } }

caution: Using this may hide other errors in your project. It will suppresses all errors of this type.

Related