CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

'error: cannot find symbol class GoogleAuth'

Open trigonometric-act opened this issue 5 years ago • 8 comments

Android studio can't find symbol class for Google Auth import com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth; fails as it doesn't recognise 'codetrixstudio'

trigonometric-act avatar Sep 07 '20 15:09 trigonometric-act

you have to Sync Project with Gradle Files.

that should work 👍

darkziah avatar Sep 27 '20 06:09 darkziah

Unfortunately, I have the same issue.

/.../android/app/src/main/java/io/ionic/starter/MainActivity.java:9: error: package com.codestrixstudio.capacitor.GoogleAuth does not exist
import com.codestrixstudio.capacitor.GoogleAuth.GoogleAuth;

I've tried to

  • npx cap sync android
  • Invalidate the cache from AndroidStudio(v4)
  • Reloaded from disk
  • Synced Project with Gradle Files

several times but it didn't help so far. Maybe you have another idea what I could try to make it run?

Thanks in advance

julian- avatar Oct 10 '20 07:10 julian-

@julian- me too do you find a solution?

mwmw7 avatar Oct 20 '20 02:10 mwmw7

@mwmw7 unfortunately not, I did not continue since then

@trigonometric-act Did you find a solution, that could help us?

julian- avatar Oct 22 '20 14:10 julian-

If anyone still needs this it's because you either need to import the class or reference it by it's full path, i.e. either add

import com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth;

at the top of your MainActivity.java file or add the class like this:

add(com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth);

dominic-ks avatar Nov 07 '20 17:11 dominic-ks

you have to Sync Project with Gradle Files.

that should work

This solved my issue with unresolved classes. Thank you very much!

IgorGamella avatar Nov 17 '20 16:11 IgorGamella

Clean and build doesn't solve for me. I solved this just ignoring and run the error and running(play button); Android studio will not break when run.

acosme avatar Mar 19 '21 21:03 acosme

you have to Sync Project with Gradle Files.

that should work 👍

image

ale30p avatar Jun 21 '21 13:06 ale30p