Java 从源代码编译android APK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18284664/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 00:03:57  来源:igfitidea点击:

Compile android APK from source code

javaandroidapk

提问by SSSK

I have a source code of Android app written in Java. I want to make some changes to the code and compile as android app. I have no knowledge on Java Android app.

我有一个用 Java 编写的 Android 应用程序的源代码。我想对代码进行一些更改并编译为 android 应用程序。我对 Java Android 应用程序一无所知。

Is there anyway for me to compile and make it as APK by using any software?

无论如何我可以使用任何软件编译并将其制作为APK吗?

Here is the source:-

这是来源:-

回答by Chrystian

Download the IDE, import the github project and run.

下载IDE,导入github项目并运行。

回答by ihsan kocak

You can use eclipse ADT.In order to publish it into Google Play you should sign it.It generates APK and you can sign it via ADT easily.

您可以使用eclipse ADT。为了将其发布到Google Play,您应该对其进行签名。它生成APK,您可以轻松地通过ADT对其进行签名。

回答by user1571055

First, u need download IDE and sdk to prepare build environment,u can get these in here:

首先,你需要下载IDE和sdk来准备构建环境,你可以在这里得到这些:

Second, u need import ActionBarSherlock as lib project, u can follow below link to check out thesecode and import to your workspace.

其次,您需要将 ActionBarSherlock 作为 lib 项目导入,您可以按照以下链接查看这些代码并导入到您的工作区。

command: git clone https://github.com/JakeWharton/ActionBarSherlock [your folder]

command: git clone https://github.com/JakeWharton/ActionBarSherlock [your folder]

u can add actionbarSherlock project as a lib project in Q2Android project.

您可以在 Q2Android 项目中添加 actionbarSherlock 项目作为 lib 项目。

Then,u can build this project.

然后,你可以构建这个项目。

回答by surhidamatya

You will be glad to know that you can start your Android application development on either of the following operating systems:

您会很高兴知道您可以在以下任一操作系统上开始您的 Android 应用程序开发:

Microsoft Windows XP or later version.

Mac OS X 10.5.8 or later version with Intel chip.

Linux including GNU C Library 2.7 or later.

Second point is that all the required tools to develop Android applications are freely available and can be downloaded from the Web. Following is the list of software's you will need before you start your Android application programming.

第二点是开发 Android 应用程序所需的所有工具都是免费提供的,并且可以从 Web 上下载。以下是您在开始 Android 应用程序编程之前需要的软件列表。

Java JDK5 or JDK6

Android SDK

Eclipse IDE for Java Developers (optional)

Android Development Tools (ADT) Eclipse Plugin (optional)

For further enquiry you can go through

如需进一步查询,您可以通过

1.Tutorials Point

1.教程点

The other way would be to use Android Studio

另一种方法是使用 Android Studio

Before you start this class, be sure you have your development environment set up. You need to:

在开始本课程之前,请确保您已设置好开发环境。你需要:

Download Android Studio.
Download the latest SDK tools and platforms using the SDK Manager.

Go through this Migrate to Android Studioto import your project onto Android Studio

通过此迁移到 Android Studio将您的项目导入到 Android Studio

  1. Android site
  1. 安卓网站

回答by Krishna Kumar

Simple, follow these steps....

很简单,按照以下步骤......

1.Download & install android studio 2. Install Java SDK (ie) jdk 3. Open android studio 4. Choose File->import 5. Select your source code

1.下载并安装android studio 2.安装Java SDK(即)jdk 3.打开android studio 4.选择File->import 5.选择你的源代码

回答by Zakir

If the changes you are planning to make in q2androidapp are simple enough and you know what you are changing then sur007has captured all that you need. Else it's a job for someone hands on with Android development.

如果您计划在q2android应用程序中进行的更改足够简单,并且您知道要更改的内容,那么您sur007已经捕获了您需要的所有内容。否则,这是从事 Android 开发的人的工作。

Another big warningfor you: The app is over 4 years old, which means you have to carefully choose API and Sdk Mix/Max versions.. managing version support can be hectic even for seasoned android developers - so be prepared to face backward compatibilityand API depreciatedissues

给你的另一个重要警告:该应用程序已经超过4 年了,这意味着你必须谨慎选择 API 和 Sdk Mix/Max 版本。即使对于经验丰富的 android 开发人员来说,管理版本支持也可能很忙 - 所以要准备好面对backward compatibilityAPI depreciated问题

All the best!

祝一切顺利!