Android Question Problem with Google Map v2.

javiers

Active Member
Licensed User
Longtime User
I think I've followed the steps outlined in the Google Maps Android v2 tutorial tutorial. I get the following error:

*** Service (starter) Create ***** Service (starter) Start **** Activity (main) Create, isFirst = true ***** Service (starter) Create ***** Service (starter) Start **** Activity (main) Create, isFirst = true **** Activity (main) Resume ***** Service (firebasemessaging) Create ***** Service (firebasemessaging) Start **Android.content.res.Resources $ NotFoundException: Unable to find resource ID # 0x2711At android.content.res.Resources.getResourceName (Resources.java:2363)At android.app.FragmentManagerImpl.moveToState (FragmentManager.java:891)At android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1072)At android.app.BackStackRecord.run (BackStackRecord.java:852)At android.app.FragmentManagerImpl.execPendingActions (FragmentManager.java:1478)At android.app.FragmentManagerImpl $ 1.run (FragmentManager.java:452)At android.os.Handler.handleCallback (Handler.java:815)At android.os.Handler.dispatchMessage (Handler.java:104)At android.os.Looper.loop (Looper.java:194)At android.app.ActivityThread.main (ActivityThread.java:5637)At java.lang.reflect.Method.invoke (Native Method)At java.lang.reflect.Method.invoke (Method.java:372)At com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java:959)At com.android.internal.os.ZygoteInit.main (ZygoteInit.java:754)


The version of B4A is 7.01.

The manifiest:

'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")

'End of default text.


AddApplicationText(<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="XXXXXXXXXXXXXXXXXXXXXXXX"/>)


'************ Google Play Services Base ************
AddApplicationText(
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@Integer/google_play_services_version" />
)
'************ Google Play Services Base (end) ************

Configure paths

upload_2017-8-1_18-48-16.png



And de SDK Manager:

upload_2017-8-1_18-51-52.png


upload_2017-8-1_18-53-7.png


I'm doing something wrong ...
 

javiers

Active Member
Licensed User
Longtime User
The error occurs when loading the map.
According to the tutorial, I have placed this at the beginning.



#Region Project Attributes
#ApplicationLabel: FMC mensajes
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
' GoogleMaps additional jar
#AdditionalJar: com.google.android.gms:play-services-maps

#End Region


If I delete the map, the application works.

Thanks for your answer.
 
Upvote 0

javiers

Active Member
Licensed User
Longtime User
Yes, I added it with the designer. But I've used Warwound's AndroidMapsUtils example as a base project and it works fine for me.

I do not know what the problem will be, but it's fixed.

Thanks for the reply.

B4X is a great tool, but even better support and community! :):)
 
Upvote 0
Top