I posted this in the Amazon developer forum, but thought I would try here too to see if anyone had any ideas. At least maybe the supported_abis
issue could be explained a little? Does the newer maps v2 API no longer have this field included? The maps debug and release registration has been completed using the current debug and release keystores I have. As shown in the logcat, the maps v2 is loading (until the error of course).
compileSdkVersion 28
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
buildToolsVersion '28.0.3'
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.
The SUPPORTED_ABIS
field is part of the Android Build class. It was introduced in API 21.
Your problem is that your Kindle isn't running API 21. The latest version of Fire OS for the Kindle Fire HDX 2013 is 4.5.5.3, which is based on API 19/KitKat.
Sorry, but if you want to test this on Fire OS, you'll need to get a Kindle device that runs at least Fire OS 5, and your app won't work on anything below that. Amazon has instructions for setting up a Kindle emulator (sort of), but it's really just the hardware profile of a Kindle with normal Android. It should be enough to see how the app will work on Fire OS, though.