Android Question google maps nodefclassfound error

abcroverix

Member
Licensed User
Longtime User
Hello everybody,
I tried to integrate google maps in my app following the Erel's tutorial.
After the app starts it creashes with this error:

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil;
at anywheresoftware.b4a.objects.MapFragmentWrapper.IsGooglePlayServicesAvailable(MapFragmentWrapper.java:101)
at b4a.example.main._activity_create(main.java:282)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at b4a.example.main.afterFirstLayout(main.java:98)
at b4a.example.main.access$100(main.java:16)
at b4a.example.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)

My b4A version is 3.50.
I use a nexus 7 with android 5.0.2

From AVD I installed the google play services and Google Maps api v2.
Create the key for google maps.

In my manifest files I add these lines:

AddManifestText( <permission
android:name="$PACKAGE$.permission.MAPS_RECEIVE"
android: protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>)
AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaXXXXXXXXXXX"/>)

AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" />)

Where is my mistake?

Many thanks
 

eurojam

Well-Known Member
Licensed User
Longtime User
Did you copy google-play-services-lib library (google-play-services.jar) to the b4a Library directory?
 
Upvote 0
Top