Feed Buzzard
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
Feed Buzzard
No Result
View All Result
Home World Tech

NoClassDefFoundError at Google Play Services V2 library –

Gordon James by Gordon James
January 7, 2021
in World Tech
0
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

Development issue/problem:

I get the following exception when I try to use the Google Play Services V2 library after studying the official instructions.

java.lang.NoClassDefFoundError: com.google.android.gms.R$string
on com.google.android.gms.common.GooglePlayServicesUtil.b (Unknown source)
on com.google.android.gms.common.GooglePlayServicesUtil.a (Unknown Source)
on com.google.android.gms.common.GooglePlayServicesUtil.getErrorDialog (Unknown Source)

What have I done wrong?

How can I solve this problem?

Solution 1:

Version 2 contains resources and should be imported as a library project. See http://developer.android.com/google/play-services/setup.html for instructions on how to act in the various IDEs.

The sources are for GooglePlayServicesUtil.getErrorDialog(), which commands the user to install, update, activate, etc. Google Play services if they are not available on your device.

Solution 2:

I had the same problem once, I followed this step and was able to solve it.

First (Configure your project using the Google Developer Console)
Go to the API Console – Google Code

Creating a project As shown in Figures
.

Click New and you will be prompted to add a project name, as shown in the figure.

Give here a description of the image

Once you have created your project, it is time to choose the service we need, in this case we need android map v2, so choose Google Maps PI v2 of the service As shown, enter the description of the image here .

Now go to Api Access and create your OAuth 2.0. Enter the name of your package and your SHA1 fingerprint in the appropriate fields.
Give here a description of the image

Once you are done with OAuth 2.0, we can use your API key
to enter the image description here

Now create an Android project with the same package name as OAuth 2.0. and check if you have the Google Play service in the Android SDK manager, if not, install the Google Play service.
enter the image description here

After installing the Google Play service, you can find the Google Play library in your Android YourSdkpathextrasgoogle_play_services.import this project into your workspace and enter it as a reference library for your project
, enter the description of image here.

Give here a description of the image

Give here a description of the image

Then add the corresponding Java and XML files to your project.

MainActive.java

Packing your package;// the name of the package used to make the api key.

import com.google.android.gms.common.ConnectionResult ;
import com.google.android.gms.common.GooglePlayServicesUtil ;
import com.google.android.gms.maps.GoogleMap ;
import com.google.android.gms.maps.SupportMapFragment ;

import android.os.bundle; import
android.app.Activity; import
android.app.Dialog; import
android.support.v4.app.FragmentActivity; import
android.view.Menu ;

The MainActivity public class expands FragmentActivity {
GoogleMap googleMap ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState) ;
setContentView(R.layout.activity_main) ;

// Get status
int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext() ) ;

// Show status
if(status==ConnectionResult.SUCCESS)
{
SupportMapFragment supportMapFragment = (SupportMapFragment)
getSupportFragmentManager().findFragmentById(R.id.map)

// get map reference cegoogleMap = supportMapFragment.getMap();}more

int requestCode = 10;
Dialog = GooglePlayServicesUtil.getErrorDialog(status, this, requestCode);
dialog.show();
}
}.

@General Boolean menu
onCreateOptionsMenu(Menu) {
// Inflate the menu; this adds items to the action bar, if any.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

}

Active_main.xml

AndroidManifest.xml

I hope this helps you

Solution 3:

For Android Studio :

1) Open the module parameters :

2) Add (import) the google_play_service_lib module of the SDK.

Photo by

3) The module google_play_service_lib is marked as library.

4) Add the google_play_service.jar library of the SDK.

5) Exit.

Photo by

Solution 4:

If you have already updated the SDK and received such an error, you should take this into account:

  • Use the new version of google-play-services.jar if you have copied this file in your Eclipse project.
  • set target=android-19 in the project properties.
  • For the newer API (I use API 19) you may need to add the following code

AndroidManifest.xml

I also use our Google Sdkpathextrasgoogle game services as an eclipse import library, as described above.

Solution No 5:

I fixed this bug by checking the Copy projects to workspace when importing libraries from Google Play services.
More information can be found here: http://developer.android.com/google/play-services/setup.html

Solution No 6:

if you

Compile com.google.android.gms:play-services:9.0.2.

customizing it to make a person out of it, for example, B.

Compile com.google.android.gms:play-services-location:9.0.2.

also add
compile ‘com.android.support:multidex:1.0.1’ if you have multiDexEnabled=true

Solution No 7:

I have the same problem with Android Studio when I create a project without Gradle.
The package name in AndroidManifest.xml may cause a problem in the GooglePlayService project.
It must be package=com.google.android.gms.

The problem arises when I add the library project as a new module instead of as an import module.

Give here a description of the image

When you select New Module, Android Studio displays a dialog box asking you to enter the name of the module and the name of the package. By default, the package name looks like com.example.MODULE_NAME_SPECIFY, which is incorrect. It is very easy to ignore it because the project has been successfully built.

Give here a description of the image

If you add a library project via the import module, everything should go well, because Android Studio simply adds the project without making any changes to the source code of the project library.

Solution No 8:

I’m also facing the same problem. If you run the application in an emulator, this error may occur because most emulators do not have Google PlayService (Play Store application) installed.

So try running your application on an Android device that has the PlayService application installed.

Solution: – Put the code of the error part in try…catch and then try it and it will also work in the emulator.

Note :- The Google mail service requires palliation services, otherwise the error SERVICE_NOT_AVAILABLE will be issued.

Good luck!

Related Tags:

googleplayservicesversion react-native,androidmapsutilsversion,api for android,google play api,google play games,google play services minimum android version,google play services apk,how to update play store latest version,google play store app install,google play store download,google play store app install for pc,play.google.com refund

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
Gordon James

Gordon James

James Gordon is a content manager for the website Feedbuzzard. He loves spending time in nature, and his favorite pastime is watching dogs play. He also enjoys watching sunsets, as the colors are always so soothing to him. James loves learning about new technology, and he is excited to be working on a website that covers this topic.

Related Posts

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics
World Tech

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics

December 15, 2022
World Tech

Rockstar Games Brings GTA to The Metaverse

October 20, 2022
World Tech

Ways Technology Is Changing The World Of Education

September 21, 2022
Next Post

Devices with Android + MIUI and setCustomSelectionActionModeCallback –

How To Stop Installation of Multiple Slice APK In Android Studio 2.3 –

Problems In Your Air Conditioner- Fix It Like A Pro

No Result
View All Result

Recommended

5 Useful Things You Can Do With cURL and Proxies

7 hours ago
Here’s Everything You Need to Know about Moles

Here’s Everything You Need to Know about Moles

3 days ago

Comic Play Casino Games

1 week ago

Here is a List of Some of the Most Interesting Slots You Can Play

1 week ago

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

Recent Posts

  • 5 Useful Things You Can Do With cURL and Proxies January 27, 2023
  • Here’s Everything You Need to Know about Moles January 25, 2023
  • Comic Play Casino Games January 20, 2023
  • Here is a List of Some of the Most Interesting Slots You Can Play January 20, 2023

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

© 2022 FeedBuzzard.com

No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT