fire-app-builder icon indicating copy to clipboard operation
fire-app-builder copied to clipboard

Cannot run sample Application with Android Studio 3.6.3

Open tmm1 opened this issue 4 years ago • 5 comments

The build works, but if I try to create an APK or use the Run button I get an error:

05/28 12:49:25: Launching 'app' on Amazon AFTR.
Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: No outputs for the main artifact of variant: debug

tmm1 avatar May 28 '20 19:05 tmm1

Hi Aman,

Please try the following:

  1. In Android Studio go to edit the configuration for your app (the Run/Debug Configurations dialog) and under Installation Options, for the Deploy field choose the value of Nothing.

  2. That error can also happen because your Gradle version is too old for a newer Android Studio version.

This SO post has detailed solutions, please check it out: https://stackoverflow.com/questions/56440572/how-to-fix-unable-to-determine-application-id-com-android-tools-idea-run-apkpr

levonlevonian avatar May 28 '20 20:05 levonlevonian

Thanks for the help.

I don't think Deploy: Nothing works here, because I'm trying to build/deploy/run the sample app as outlined here:

https://developer.amazon.com/docs/fire-app-builder/download-and-build.html

It looks like this repo is still trying to use gradle 2.14:

https://github.com/amzn/fire-app-builder/blob/master/Application/gradle/wrapper/gradle-wrapper.properties#L6

Are there any plans to change that? I tried to upgrade gradle and ran into all sorts of other build problems.

tmm1 avatar May 28 '20 20:05 tmm1

At this time, regrettably there are no plans to update the repo. You can still build it with Deploy: Nothing, and then deploy it as a separate step. As for fixing the older Gradle version, please follow the detailed instructions in this answer: https://stackoverflow.com/a/60926784/58038

levonlevonian avatar May 28 '20 20:05 levonlevonian

You can still build it with Deploy: Nothing, and then deploy it as a separate step

I got it working as follows:

  • upgraded to Android Studio 4.0 (not required)
  • switched the app to Deploy: Nothing
  • used Build > Build APK
  • installed manually via adb install ./Application/app/build/outputs/apk/FireAppBuilder-debug-1.0.7-unaligned.apk
  • clicked the Run button in Android Studio

tmm1 avatar May 28 '20 21:05 tmm1

Awesome, glad you got it working!

levonlevonian avatar May 28 '20 21:05 levonlevonian