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


i started targeting android o in project error when calling startactivityforresult(intent, int, bundle) error saying can called 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' 

edit:

as per link, bug. workaround, add comment above line of code gives warning:

//noinspection restrictedapi 

old ans:

i hope not importing wrong library. fragment support library supports fragment devices running versions prior android3.0.

as per post in so

also remember use activity if using android.app.fragment;  use fragmentactivity if using android.support.v4.app.fragment.  never attach android.support.v4.app.fragment android.app.activity, cause exception thrown. 

android.app.fragment different android.support.v4.app.fragment.

the support library 1 annotated @restrictto(library_group), , @hide - it's not meant public api.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -