AppCompatActivity.onCreate can only be called from within the same library group
As Felipe already pointed out in his comment this is a bug in the pre-release version of the tools.
You can workaround it for now, until Google release a fix, by adding the following into your project module's build.gradle file:
android {
lintOptions {
disable 'RestrictedApi'
}
}
It's worth noting that this may hide true errors in your project as it suppresses all errors of that type, so the better option would be to downgrade the version of Android Studio and the tools used in the project.
ComponentActivity can only be called from within the same library group prefix
You've imported the wrong ComponentActivity. Make sure you are importing androidx.activity.ComponentActivity
WorkManager: ResolvableFuture can only be called from within the same library group prefix
You shouldn't be using ResolvableFuture
at all, much less the internal version used by WorkManager.
Instead, you should be using the AndroidX Concurrent library:
androidx.concurrent:concurrent-futures:1.0.0
providesCallbackToFutureAdapter
class, a minimalistic utility that allows to wrap callback based code and return instances ofListenableFuture
You'll note in the 1.0.0-beta01 release notes that even the AndroidX Concurrent Library has removed ResolveableFuture
from its public API.
The Javadoc for CallbackToFutureAdapter
has a full example of what this looks like:
public ListenableFuture<Result> startWork() {
return CallbackToFutureAdapter.getFuture(completer -> {
// Your method can call set() or setException() on the
// Completer to signal completion
startSomeAsyncStuff(completer);
// This value is used only for debug purposes: it will be used
// in toString() of returned future or error cases.
return "startSomeAsyncStuff";
});
}
So you'd use CallbackToFutureAdapter.Completer
in place of a ResolvableFuture
in your startSomeAsyncStuff
method.
SelectionTracker.startRange can only be called from within the same library group (groupId=androidx.recyclerview)
Many methods in SelectionTracker
are marked as
@hide
@RestrictTo(LIBRARY_GROUP)
including range methods. This means that they are for internal use. At least for now.
(SOLVED) getUid can only be called from within the same library group (groupId=com.google.firebase)
Solution: I didn't notice there were 2 user variables (Class variable and method variable), I was using the method variable instead the auth variable.
Warning: NavController.setNavigatorProvider can only be called from within the same library group (groupId=androidx.navigation)
You might avoid warning using the below code:
navController.navigatorProvider.addNavigator(navigator)
Related Topics
How to Detect If User First Time in Firebase
Integrate Zxing in Android Studio
Custom Cut/Copy Action Bar for Edittext That Shows Text Selection Handles
Version Conflict Updating to 8.4.0
Programmatically Set Android Phone's Background
How to Change the Size of a Switch Widget
Launch Skype from an App Programmatically & Pass Number - Android
Avoid Reloading Activity with Asynctask on Orientation Change in Android
Centering Recyclerview Items with Flexboxlayoutmanager
Android: Background Image Size (In Pixel) Which Support All Devices
Quaternion Rotation Does Not Work as Excepted
Why Was "Avoid Enums Where You Only Need Ints" Removed from Android's Performance Tips
Disable Edittext Blinking Cursor
Is 'Shouldoverrideurlloading' Really Deprecated? What How to Use Instead
How to Draw a Route, Along an Existing Road, Between Two Points
How to Get Name of Wifi-Network Out of Android Using Android API