def METHOD_NAME(package_command, first_app_generated):
    """Error raised if template's target version is not supported."""
    # Mock the build command previously called
    create_file(package_command.binary_path(first_app_generated), content="")
    package_command.verify_app = MagicMock(wraps=package_command.verify_app)
    package_command._briefcase_toml.update(
        {first_app_generated: {"briefcase": {"target_epoch": "0.3.16"}}}
    )
    with pytest.raises(
        BriefcaseCommandError,
        match="The app template used to generate this app is not compatible",
    ):
        package_command(first_app_generated, packaging_format="apk")
    package_command.verify_app.assert_called_once_with(first_app_generated)