question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with new MainActivity.java file.

See original GitHub issue

Hello. I updated to android studio 4.2.1 and Capacitor 3 plugins. This new updates give an empty MainActivity.java file with only this lines:

package com.aplicationname.app;

import com.getcapacitor.BridgeActivity;

public class MainActivity extends BridgeActivity {
}

then I have to change to:

package com.aplicationname.app;

import android.os.Bundle;
import com.getcapacitor.BridgeActivity;
import com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth;

public class MainActivity extends BridgeActivity {

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

        registerPlugin(GoogleAuth.class);
     }

}

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:16

github_iconTop GitHub Comments

3reactions
FabioGoncalvescommented, Jun 24, 2021

Hi @codemickey78 , I just have this image, image but before you have to settle some requirements, you can find them here: https://github.com/CodetrixStudio/CapacitorGoogleAuth https://devdactic.com/capacitor-google-sign-in/ https://www.youtube.com/watch?v=Rs1imvTbeN0

I tryed today, and it’s working so you can do it 😃

1reaction
learningRkkcommented, Oct 6, 2021

I had tried all of the above steps, and it was still getting stuck with a loading screen, after having selected an emailId. Then, I went to the OAuth Consent screen, and added my emailId to the list of Tester emails. and it worked.

Thanks for all the help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - MainActivity.java - errors on start - Stack Overflow
So I've found solution. I took other version of eclipse - Juno The wrong version is Kepler 4.3 And problem could be of...
Read more >
Issue with Android Studio - Java - Codecademy Forums
The missing files are: HelloWorld > app > src > main > res “layout”. And therefore I don't have “activity_main.xml” either. Hello ...
Read more >
Different Ways to fix “Default Activity Not Found” Issue in ...
This issue occurs because Android Studio was not able to detect the default MainActivity in your Android Studio Project.
Read more >
Issue with flutter local auth : error in the mainactivity.java file
I have followed the docs and updated the main activity file as follows: package com.example.{project name}; import android.os.
Read more >
Locate MainActivity Java or Kotlin file in Android Studio
Look for 1.Project at the top left vertical bar. · You would see folder: app · Expand app folder -> You would see...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found