Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
I think it is because we've deprecated the accidently public mDatabase. Should be fine.
Can you share the full warning so we can verify?
Can you share the full warning so we can verify?
an...@gmail.com <an...@gmail.com> #3
That's the entire message:
...app\build\generated\source\kapt\remoteDevDebug\za\co\ruggedmobile\petermeter\data\PeterMeterDb_Impl.java:
uses or overrides a deprecated API.
Recompile with -Xlint:deprecation for details.
...app\build\generated\source\kapt\remoteDevDebug\za\co\ruggedmobile\petermeter\data\PeterMeterDb_Impl.java:
uses or overrides a deprecated API.
Recompile with -Xlint:deprecation for details.
an...@gmail.com <an...@gmail.com> #4
I see it is a "Note" not a warning.
se...@gmail.com <se...@gmail.com> #5
Here are the warnings I'm getting with -Xlint:deprecation:
AppDatabase_Impl.java:154: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:155: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:156: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onCreate(_db);
^
AppDatabase_Impl.java:163: warning: [deprecation] mDatabase in RoomDatabase has been deprecated
mDatabase = _db;
^
AppDatabase_Impl.java:166: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:167: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:168: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onOpen(_db);
^
AppDatabase_Impl.java:154: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:155: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:156: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onCreate(_db);
^
AppDatabase_Impl.java:163: warning: [deprecation] mDatabase in RoomDatabase has been deprecated
mDatabase = _db;
^
AppDatabase_Impl.java:166: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
if (mCallbacks != null) {
^
AppDatabase_Impl.java:167: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
for (int _i = 0, _size = mCallbacks.size(); _i < _size; _i++) {
^
AppDatabase_Impl.java:168: warning: [deprecation] mCallbacks in RoomDatabase has been deprecated
mCallbacks.get(_i).onOpen(_db);
^
[Deleted User] <[Deleted User]> #7
2.1.0-alpha05 ?
still not released, right?
How could I go around this issue for now?
still not released, right?
How could I go around this issue for now?
Description
"uses or overrides a deprecated API."
It appears on the generated implementation of the RoomDatabase subclass, e.g.
given
abstract class MyTestDb : RoomDatabase()
in file MyTestDb.kt
The file MyTestDb_Impl.java is generated, and above warning is produced when the generated Java file is compiled during a full build.
Component used:
androidx.room:room-runtime
androidx.room:room-compiler
Version used:
2.1.0-alpha01
'com.android.tools.build:gradle:3.3.0-alpha11
kotlin_version = '1.2.71'
Devices/Android versions reproduced on:
Compile time
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).