Android Question Compiling error on Google Maps android tutorial

microbox

Active Member
Licensed User
Longtime User
Hi everyone, I following the tutorial on this link https://www.b4x.com/android/forum/threads/google-maps-android-v2-tutorial.24415/ but when compiling I have the following errors.
B4AGooglemapTest.png

I also attached my paths configuration just in case. And also I'm lost with step #6, not really sure where to place it
(#AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms)

Kind regards,
microbox
 

DonManfred

Expert
Licensed User
Longtime User
6. Add an #AdditionalRes attribute to the main activity:
You should add a reference to Google play resources by adding the following line:
Code:
#AdditionalRes: <google-play-services res folder>, com.google.android.gms
For example:

#AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms


Seems that you are missing that one
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
6. Add an #AdditionalRes attribute to the main activity:
You should add a reference to Google play resources by adding the following line:
Code:
#AdditionalRes: <google-play-services res folder>, com.google.android.gms
For example:

#AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms


Seems that you are missing that one
Hi DonManfred, thanks for the time...but I'm still lost:confused: when it mean Add an #AdditionalRes attribute to the main activity is this referring to the Activity attributes?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    '#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s
#End Region
#AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
B4X:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
    '#CustomBuildAction: 1, c:\windows\system32\attrib.exe, +r res\*.* /s
#End Region
#AdditionalRes: C:\android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
It's strange I'm still getting another error...
B4AGooglemapTesterr2.png

it seems I'm missing this com.google.android.gms
Best regards,
microbox
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
In latest B4a version you can also use
B4X:
#AdditionalRes: $AndroidSDK$\extras\google\google_play_services\libproject\google-play-services_lib\res, com.google.android.gms
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
I'm still stuck with the compiler error...hope someone can help me out. But for now I will use OSMDroid by wardwound to be able to continue develop my app in mind :)
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Hi Erel, is this the one?
B4AGooglemapTesterr4.png

Like this?
#AdditionalRes: $AndroidSDK$ \extras\google\google_play_services\libproject\google-play-services_lib\res
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Which error do you get? The path error?
Not sure..but I think a certain file required.
B4X:
Compiling layouts code.    (0.00s)
Generating R file.    Error
C:\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.
I'm using this Android jar(C:\Android\android-sdk\platforms\android-20\android.jar)

When I change to Android 21 and up I get this error.
B4X:
B4A version: 5.20
Parsing code.    (0.00s)
Compiling code.    (0.05s)
Compiling layouts code.    (0.00s)
Generating R file.    (1.48s)
Compiling generated Java code.    (2.46s)
Convert byte code - optimized dex.    Error
Process timed out.
You can change the timeout value under Tools - IDE Options.
I already change the time out but same result.
 
Last edited:
Upvote 0

microbox

Active Member
Licensed User
Longtime User
Finally got it to work.. set the delay to 70 sec and android 23..but when I run the the application..its says "Google Play services not available". How can I resolve this?
 
Upvote 0
Top