简体   繁体   English

使用 Felgo Qt Creator 生成 android APK 的最简单/快捷方式是什么?

[英]What is the EASIEST/QUICKIEST way to generate an android APK using Felgo Qt Creator?

There is no such android options and menus here: https://stackoverflow.com/a/28292048/5648245 :(这里没有这样的 android 选项和菜单: https://stackoverflow.com/a/28292048/5648245 :(

Duplicate?复制? Issues to build apk with qt creator why there is no answer there after one year?? 使用 qt 创建者构建 apk 的问题为什么一年后没有答案?

At menu "Tools/Options/Kits" the only auto detected is felgo desktop gcc.在菜单“工具/选项/套件”中,唯一自动检测到的是 felgo 桌面 gcc。

Obs.: I can't stand watching videos with instructions in case there is any... Obs.:我无法忍受观看带有说明的视频,以防万一……

ps.: I am using Qt Creator 4.11.2 on Ubuntu 18.04 ps.:我在 Ubuntu 18.04 上使用 Qt Creator 4.11.2


update:更新:

I tried gradle as specified here: https://developer.android.com/studio/build/building-cmdline#DebugMode我按照此处的说明尝试了 gradle: https://developer.android.com/studio/build/building-cmdline#DebugMode
with: gradle assembleDebug与: gradle assembleDebug
but there is no such task as I confirm with gradle tasks --all .但没有这样的任务,我用gradle tasks --all确认。

also there is an android path with these files:还有一个包含这些文件的android路径:

AndroidManifest.xml
build.gradle

and gradle tasks there outputs this error:gradle tasks输出此错误:
Could not get unknown property 'androidCompileSdkVersion' for extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

I think I need to install android compiler?我想我需要安装 android 编译器? I will research more later...以后我会研究更多...

I suggest you start with pure Qt Creator (implement a simple game in QML).我建议你从纯 Qt Creator 开始(用 QML 实现一个简单的游戏)。 Qt Creator has excellent online instructions and support on various forums. Qt Creator 在各种论坛上有出色的在线说明和支持。 If you need physics for 2d game consider adding QML-BOX2D.如果您需要 2d 游戏的物理,请考虑添加 QML-BOX2D。 (An open source add-on). (一个开源插件)。

Felgo has wrapped some functions to save you a few steps, but their claim of 90% less code then other platforms is due to QML (little to do with Felgo). Felgo 已经封装了一些功能来为您节省一些步骤,但他们声称比其他平台少 90% 的代码是由于 QML(与 Felgo 几乎没有关系)。 Felgo forum posts from users are unanswered and the Felgo Slack channel shows unanswered questions going back months, But it doesn't matter if Felgo is dying, you should still start with pure Qt / QML来自用户的 Felgo 论坛帖子未得到答复,Felgo Slack 频道显示几个月前未答复的问题,但如果 Felgo 死了也没关系,您仍然应该从纯 Qt / QML 开始

The Qt site offers instructions for compiling to APK (see Qt Android Instructions ), they even have helper classes for placing the executable in the app stores/selling. Qt 站点提供了编译为 APK 的说明(请参阅Qt Android 说明),它们甚至还有用于将可执行文件放置在应用商店/销售中的帮助类。 Once you master QML (and possible QML-box2d) then you can look at some add-ons to make life a bit simpler.一旦您掌握了 QML(以及可能的 QML-box2d),您就可以查看一些附加组件,让生活变得更简单。

I would however suggest you move to Qt5 - Qt4 is getting pretty old.但是,我建议您转到 Qt5 - Qt4 已经很老了。 I'm not saying QML is the "best" game dev platform, but if Qt/QML/C++ checks your boxes then it is great and you should be able to build for Android fairly easily using the link above (instructions too long to copy into this answer)我并不是说 QML 是“最好的”游戏开发平台,但是如果 Qt/QML/C++ 勾选了你的框,那么它很棒,你应该能够使用上面的链接相当容易地为 Android 构建(说明太长,无法复制进入这个答案)

You should be fine following the steps in this guide https://felgo.com/doc/felgo-deployment-android/#add-felgo-packages-for-android-platform您应该可以按照本指南https://felgo.com/doc/felgo-deployment-android/#add-felgo-packages-for-android-platform中的步骤进行操作

There is also Felgo Cloud Builds, you don't have to setup anything on your machine https://felgo.com/cloud-builds , even you can skip any install by using the WebIDE http://ide.felgo.com/还有 Felgo Cloud Builds,您无需在机器上设置任何东西https://felgo.com/cloud-builds ,即使您可以使用 WebIDE http://ide.felgo.com/跳过任何安装

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM