Android Question Can not compile project with AppCompat lib

microbox

Active Member
Licensed User
Longtime User
Hi everyone... I need to add AppCompat lib for my application together with FusedLocationProvider and GoogleMaps lib. But when adding AppCompat it gives me this error
B4X:
B4A line: 43
Dim jo As JavaObject = gmap
javac 1.8.0_181
src\b4a\example3\main.java:421: error: cannot access GoogleMap
_jo.setObject((java.lang.Object)(parent.mostCurrent._gmap.getObject()));
                                                                   ^
  class file for com.google.android.gms.maps.GoogleMap not found
I attached the source I'm working on. I appreciate any help.

Thanks,
microbox
 

Attachments

  • DemoTracker.zip
    9.7 KB · Views: 122

DonManfred

Expert
Licensed User
Longtime User

Attachments

  • micro.zip
    10 KB · Views: 131
Last edited:
Upvote 0

microbox

Active Member
Licensed User
Longtime User
follow the tutorial for google maps
https://www.b4x.com/android/forum/threads/google-maps.63930/

Looks like you are using an OLD deprecated tutorial with old references.

Your project is missing runtimepermissions and also request for the permissions too....
Also your manifest is NOT sdk 28 ready

You really should be more careful when implementing.....
Hi DonManfred...thank you for the help and time answering. I'd tried to go over the tutorial but I'm still stuck even to the point of reinstalling to a new machine.
I'm getting this error even I updated the sdk.
B4X:
 Error
c:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:28: error: Attribute "layout_anchorGravity" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:30: Original attribute defined here.
c:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:67: error: Attribute "layout_insetEdge" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:67: Original attribute defined here.
c:\android\tools\..\extras\b4a_remote\com\android\support\coordinatorlayout\28.0.0\unpacked-coordinatorlayout-28.0.0\res\values\values.xml:84: error: Attribute "layout_dodgeInsetEdges" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\coordinatorlayout\coordinatorlayout\1.0.0\unpacked-coordinatorlayout-1.0.0\res\values\values.xml:86: Original attribute defined here.
c:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:36: error: Attribute "fontProviderFetchStrategy" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:42: Original attribute defined here.
c:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:51: error: Attribute "fontProviderFetchTimeout" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:54: Original attribute defined here.
c:\android\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:61: error: Attribute "fontStyle" already defined with incompatible format.
c:\android\tools\..\extras\b4a_remote\androidx\core\core\1.0.2\unpacked-core-1.0.2\res\values\values.xml:62: Original attribute defined here.
 
Upvote 0

microbox

Active Member
Licensed User
Longtime User
The project compiles fine though it needs to be updated to handle runtime permissions before calling flp.RequestLocationUpdates.
@microbox which version of B4A are you using? Can you post a screenshot of Tools - Configure Paths dialog?

Thank you for the quick reply Erel..
B4A version is 8.50 and attached is the screenshot of the configure paths.

Screen Shot 2019-08-21 at 1.29.52 PM.png
 
Upvote 0
Top