Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Error NoClassDefFoundError #19

Open
appdevsa opened this issue Nov 12, 2018 · 1 comment
Open

Android Error NoClassDefFoundError #19

appdevsa opened this issue Nov 12, 2018 · 1 comment

Comments

@appdevsa
Copy link

I've installed the plugin and followed the instructions on my Angular NativeScript application. It works fine on iOS. But running Android I get this error:

NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/api/Api$zzf; at com.google.android.gms.location.LocationServices

Any ideas guys I went over everything again and don't think I missed a step?

@keithgulbro
Copy link

keithgulbro commented Jul 6, 2020

@appdevsa Here's the solution:

Inside your App_Resources/Android directory modify the app.gradle file to include the following:

// Add your native dependencies here:
android {
  defaultConfig {  
    generatedDensities = []
    applicationId = "com.org.appname"
  }
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }

   // These dependencies should resolve the gradle error
  dependencies {
    implementation 'com.google.android.gms:play-services-gcm:15.0.1'
    implementation 'com.google.android.gms:play-services-location:15.0.1'
  }  
} 

Hopefully this helps! 😎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants