question

jj avatar image
jj asked ·

Getting error when trying to load map fragment

I am trying to migrate an existing Android app to Fire OS, and cannot get the maps v2 to load.

Using this:

<fragment
   android:id="@+id/mission_map"
   android:layout_width="match_parent"
   android:layout_height="match_parent"
   class="com.amazon.geo.mapsv2.MapFragment" />
setContentView(R.layout.mission_map_layout);

I continue getting this error in the logs:

Caused by: java.lang.NoSuchFieldError: android.os.Build.SUPPORTED_ABIS

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.pvt.RemoteContextUtils.loadModule(RemoteContextUtils.java:152)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.util.AmazonMapsRuntimeUtil.loadEngineContext(AmazonMapsRuntimeUtil.java:215)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.util.AmazonMapsRuntimeUtil.access$100(AmazonMapsRuntimeUtil.java:50)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.util.AmazonMapsRuntimeUtil$DefaultEngineLoader.createInstance(AmazonMapsRuntimeUtil.java:613)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.util.AmazonMapsRuntimeUtil$DefaultEngineLoader.createInstance(AmazonMapsRuntimeUtil.java:608)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.pvt.LazyInitializer.get(LazyInitializer.java:41)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.util.AmazonMapsRuntimeUtil.getRemoteContext(AmazonMapsRuntimeUtil.java:325)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.MapsInitializer.initialize(MapsInitializer.java:54)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.MapFragment$InitializerTask.doInBackground(MapFragment.java:302)

E/AndroidRuntime(10981): at com.amazon.geo.mapsv2.MapFragment$InitializerTask.doInBackground(MapFragment.java:299)

E/AndroidRuntime(10981): at android.os.AsyncTask$2.call(AsyncTask.java:288)

I am trying to run it on a Fire tablet with Fire OS 4.5.5.3. Is this just too old to run it? The app was built with the newest Android SDKs (28) and gradle files, and would be difficult to roll back to an old set.

Other activities and fragments load just fine throughout the app, except for maps v2.

I added it using a local Maven repository.

This is true:

return AmazonMapsRuntimeUtil.<em>isAmazonMapsRuntimeAvailable</em>(context) == com.amazon.geo.mapsv2.util.ConnectionResult.SUCCESS;

I don't find much on supported_abis, at least how it applies to Amazon maps, other than it is a CPU spec. Is this tablet just too old to load? It is all I have to test with. Why does it load other activities and just can't load this amazon maps v2 fragment? Not trying to load location services or anything. The fragment is wrapped in a simple relative layout.

Any help would be much appreciated.

amazon maps
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered ·

Hi jj,

Check the end of the Introduction section here: https://developer.amazon.com/docs/maps/get-started.html

What is your tablet name / model / year? Have you setup Maps support in your Dev Portal account? Thanks!

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jj avatar image
jj answered ·

Yes, read all the docs. Everything is in place as far as I can tell.

The maps API is registered for the package name for both debug and release builds.

Kindle Fire HDX 8.9 (3rd generation). I believe this was a 2013 model.

10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.