Questions tagged appcompatactivity

Explore the latest questions and answers asked by our top developers.

Unknown method registerForActivityResult

I’m trying to request permissions, it’s throwing unknown method for registerForActivityResult, at first I was using regular, because, due to lack of a PC at the moment, I’ve been using AIDE and I was having issues with AppCompatActivity before, but I noticed that the registerForActivityResult() method belongs to ActivityResultCaller which isn’t implemented by Activity […]

By Michael
Categorized as aide, android, appcompatactivity, java, registerforactivityresult

I only have the log crash about an app and I can’t replicate the crash, what could be the problem

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sand.StarActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at at at at$H.handleMessage( at android.os.Handler.dispatchMessage( at android.os.Looper.loop( at at java.lang.reflect.Method.invoke( at$ at Source: Android Questions

FragmentActivity which is a supertype of MainActivity can not be accessed

When I wanna create a new project in AS I get this error: Cannot access ‘’ which is a supertype of ‘com.example.test123.MainActivity’. Check your module classpath for missing or conflicting dependencies After that I can not build/rebuild or run my clean new project. any idea? Thanks in advance. Source: Android Questions

By jafar aml
Categorized as android, android-activity, appcompatactivity, gradle

cannot resolve activitycompat and appcompatactivity

PLS HELP. I think android studio Gradle files or settings got disturbed may be when adding external jar libraries or when I tried to rename a package. Whenever I open new project or even an already finished project Im getting errors. Even whem i open new project BUILD FAILED in 24s 6 actionable tasks: 6 […]

By AK11
Categorized as android, appcompatactivity, build, gradle, java

How to make ripple effect not over fillet boundary for Actionbar’s option menu by using AppCompatActivity?

In Activity‘’s option menu, It has a fillet boundary in default and the ripple effect is not over it. Option_Menu_In_Activity I implement a activity by AppCompatActivity, But It is not default filled boundary like Activity, so I set a theme for AppCompatActivity by below code: AndroidManifest.xml: …. <activity android:name=".MainActivity" android:theme="@style/AAA"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category […]

By yunfeng huang
Categorized as android, android-actionbar, appcompatactivity, ripple

Flutter java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity

I am writing a flutter plugin which will start an Activity from the plugin and this Activity has to be AppCompactActivity I have this dependency in both the app and the plugin dependencies implementation ‘androidx.appcompat:appcompat:1.3.0’ but I am getting this error once startActivity called and the app crashes E/AndroidRuntime( 1212): java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity; […]

By Ebram
Categorized as android, androidx, appcompatactivity, flutter, flutter-plugin

How to fix the error. 【java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity】

I created an aar in AndroidStudio and tried to connect to it in Unity, but it gave me an error on the actual device. is supposed to be added, but I don’t know if I should add the androidx.AppCompat file, but I can’t solve the problem, so please let me know. Thank you very […]

By yamato
Categorized as android, android-studio, appcompatactivity, java, unity3d

Glide not working with AppCompatActivity in Android?

I am trying to use glide with an AppCompatActivity. It works well if I use an Activity. But if I am extending from an AppCompatActivity, the image is not loaded (there is only a completely transparent imageview). Any idea how to fix it? I am using Glide 4.12.0 and this code for loading the image: […]

By JavaForAndroid
Categorized as android, android-activity, appcompatactivity

BottomNavigationView with AppCompat

dear developers! I’m now learning to develop apps on java and i have just recently discovered that BottomNavigationView exists. Before this I actually had just buttons lined up at the bottom of layouts (shame). I faced such problem: almost all activities extend AppCompatActivity, but navigation view only works with fragments (sorry if I’m wrong). Can […]

By User52782
Categorized as android, appcompatactivity, bottomnavigationview, java, layout

‘InterstitialAd’ is abstract; cannot be instantiated

I’m updating one of my Android apps but I’m finding some problems concerning AdMob implementation (which was working well on previous versions). This is my code: public class Edition extends AppCompatActivity { private InterstitialAd mInterstitialAd; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_edition); mInterstitialAd = new InterstitialAd(this); //ERROR mInterstitialAd.setAdUnitId(getString(R.string.full_screen_test_ad)); mInterstitialAd.loadAd(new AdRequest.Builder().build()); mInterstitialAd.setAdListener(new AdListener() { @Override […]

By Tsilaicos
Categorized as admob, android, appcompatactivity, interstitial
1 2 3

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us