fire-app-builder
fire-app-builder copied to clipboard
Cannot run sample Application with Android Studio 3.6.3
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
Hi Aman,
Please try the following:
-
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.
-
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
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.
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
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
Awesome, glad you got it working!