question

John avatar image
John asked

Firefly Creating Service in AndroidManifest.xml file

I'm currently getting a errors when trying to add my Plugin as a service in the android manifest file. I'm using Android Studio with gradle. However everything else worked perfectly fine. The error says: 'com.company.android.amazon.Plugin' is not assignable to 'android.app.Service' Validates resource references inside Android XML files. Any help would be appreciated!
fire phone
10 |3000 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.

John avatar image
John answered
10 |3000 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.

Kevin@Amazon avatar image
Kevin@Amazon answered
Hi John, Take a look at your (top level) build.gradle file. To use the Amazon version of the Gradle plugin, you must update the build.gradle file for your project to be similar to: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.amazon.device.tools.build:gradle:0.11.+' } } apply plugin: 'android' android { compileSdkVersion " Amazon.com:Amazon Fire Phone SDK Addon:17" buildToolsVersion "19.1.0" defaultConfig { minSdkVersion 17 targetSdkVersion 17 } } More info in link here: https://developer.amazon.com/public/solutions/devices/fire-phone/docs/setup#Using%20the%20Android%20Gradle%20Plugin
10 |3000 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.

John avatar image
John answered
@Kevin thanks for the reply, a follow up question: Does the gradle version have to be 11+? I was originally using 9+ and have since bumped up to 10+ Also does the targetSdkVersion have to be 17? I have libraries that are dependent upon the 19 api level Thanks
10 |3000 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.

Kevin@Amazon avatar image
Kevin@Amazon answered
Hi John, Best support is version 11+, however versions 0.9.0 > 0.11.2 should all work. Link here for more info: http://central.maven.org/maven2/com/amazon/device/tools/build/gradle/ Fire Phone is based on Android 17. If building against Android 19 is necessary, run-time issues are likely to occur because Android 19 includes APIs that won't be present on the device. https://developer.amazon.com/public/solutions/devices/fire-phone/docs/fire-phone-specifications
10 |3000 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.

John avatar image
John answered
Would that be the reason why I am getting the original error I posted in the first message? Because my targetSDK is too high at level 19? Does Amazon have a timeline of when they will give support for higher Android API's? Thanks
10 |3000 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.

Kevin@Amazon avatar image
Kevin@Amazon answered
Hi John, With the Gradle build system, for FirePhone, you will be compiling against API 17. The original error you noted would be consistent with trying to pull in an API 19 library – it will fail. As for API level, we certainty we understand wanting to use the latest Android features and libs, but we are not able to share any time frames for the FirePhone at this time.
10 |3000 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.