Reputation: 2087
My project build.gradle
is:
...
compileSdkVersion 21
buildToolsVersion "22.0.1"
...
and all thing is okay, but when I change it to latest compileSdkVersion 23
and buildToolsVersion "23.0.1"
some classes like:
Browser.BookmarkColumns cannot resolve "BookmarkColumns"
or
notification.setLatestEventInfo(..) cannot resolve "setLatestEventInfo"
and ...
What is issue with this last build tools version and how can I resolve that?
Upvotes: 3
Views: 4795
Reputation: 565
Browser.BookmarkColumns has been removed in api 23, as marcinj has already said
(see http://developer.android.com/sdk/api_diff/23/changes/pkg_android.provider.html)
You could define your own BookmarkColumns object:
public static class BookmarkColumns implements BaseColumns {
public static final String URL = "url";
public static final String VISITS = "visits";
public static final String DATE = "date";
public static final String BOOKMARK = "bookmark";
public static final String TITLE = "title";
public static final String CREATED = "created";
public static final String FAVICON = "favicon";
public static final String THUMBNAIL = "thumbnail";
public static final String TOUCH_ICON = "touch_icon";
public static final String USER_ENTERED = "user_entered";
}
You can also define the BOOKMARKS_URI, which is also missing:
public static final Uri BOOKMARKS_URI =
Uri.parse("content://browser/bookmarks");
This will work on lower level apis, since these were helper objects actually. However, on api 23 you will probably have other issues with bookmarks, since other things have also changed (permissions etc).
Upvotes: 12
Reputation: 49986
setLatestEventInfo
was deprecated for some time, and since 23 it was removed. Use builder instead: How to implement the deprecated methods of Notification
As for provider.Browser.BookmarkColumns
, it was removed in api 23, and there is no replacement.
Upvotes: 4