How can I compile an APK from a GitHub source - android

I want to build an APK from this GitHub repository:
https://github.com/SDLash3D/cs16-client/
How can I do it? (Please mention the name of the apps required (preferably for Windows) and the process)

To make a apk from this repo downlad android folder using git or any tool that you prefer.
And open android studio if don't have this down download it from this link
If you don't have the android sdk with you then download android studio bundle
http://developer.android.com/sdk/index.html
For this you will need jdk . If you don't have this dowload it and install it.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
And add the jdk path as JAVA_HOME in environmental variable.
And install your android studio.
Then open the android studio and import downladed repo earlier.
Android studio will resolve the dependencies and after all is done you can build an apk from it.
You can get the apk from the app-build-output-apk folder.

Running ~/buildAPKs/build.github.bash https://github.com/SDLash3D/ will attempt to build APKs from all the AndroidManifest.xml files it finds at this GitHub account.
As https://github.com/SDLash3D/ currently has no AndroidManifest.xml files to build from, try ~/buildAPKs/build.github.bash https://github.com/BuildAPKs which should build many APKs for you from GitHub in Android on handheld as well as in Windows.

Related

location of gradle version in Android Studio

From where does the Android Studio picks the already downloaded gradle version ,There are three places where the gradle is visbile :
in the C:\Users\.gradle\caches\
in the C:\Program Files\Android\Android Studio\gradle\m2repository\com\android\tools\build\gradle
or if provided in the gradle -wrapper properties of the project. : distributionUrl=file:///c:gradle-2.14.1-all.zip
Same from where the Android Studio picks up the Android Plugin Version :
is it from C:\Program Files\Android\Android Studio\gradle\m2repository\com\android\tools\build\gradle
I wanted to know these to build the project offline and need to copy these things from one PC to another.
I think all version saved, are here:
C:\Users\Admin\.gradle
C:\Users\Admin\.gradle\caches
You can download gradle from https://gradle.org/install/
If you want to work offline extract it in your hard drive or you can also copy the files from caches.
Then follow these steps:
goto Files>Settings in Android Studio.
goto Build,Execution,Development>Gradle
choose your gradle path
See this image

How do I build a Cordova 8.x cordova.jar to include in existing Android app?

I this documentation:
Cordova documentation
I cloned the latest Cordova here: https://github.com/apache/cordova-android
But when I run "ant jar" as described in the documentation, I get this error:
cordova-android-master/framework/build.xml:124: Cannot find
/Users/neigaard/Library/Android/sdk/tools/ant/build.xml imported from
/Users/me/cordova-android-master/framework/build.xml
Google say that is because ant/build.xml was removed from Android SDK. I found a post saying that I should download a old Android SDK tools and replace my SDK tools folder with that, but I rely on my Android SDK to be working and up to date.
Is there no way to build the Cordova Android jar without an outdated Android SDK or is there somewhere I can download a pre-built jar or is there another way to integrate Cordova into a existing Android app?
You don't really need the .jar anymore, Cordova is distributed through gradle, so you can just add this in the dependencies section of your app gradle file:
implementation 'org.apache.cordova:framework:7.1.0'
Tutorial cordova.apache.org/docs/en/latest/guide/platforms/android/… looks outdated. If you just want to embed a cordova webview you don't really need the .jar anymore, Cordova is distributed through gradle, so you can just add this in the dependencies section of your app gradle file:
implementation 'org.apache.cordova:framework:7.1.0'
However if you want to create jar through ant then you don't required to use complete outdated Android SDK.You have to just place ant/build.xml in tools folder.
Below are the steps to create corodva.x.x.x.jar on Windows
Step-1 Download Android tool package from below location:
https://dl.google.com/android/repository/tools_r25.2.5-windows.zip
Step-2 Copy ant folder to
C:\Users\xxxx\AppData\Local\Android\sdk\tools
Step-3 Install Cordova using npm
npm install -g cordova
You can install specific version of cordova using cordova#version.
Step-4 Go to below location and copy your local.properties from your android project:
C:\Users\xxxxx\.cordova\lib\npm_cache\cordova-android\x.x.xx\package\framework
Step-5 Navigate to the Android package's /framework directory and run ant jar.
It creates the Cordova .jar file, formed as /framework/cordova-x.x.x.jar
FYI: It is recommended to refer the cordova requirements-and-support https://cordova.apache.org/docs/en/latest/guide/platforms/android/index.html#requirements-and-support

Cordova gradle wrapper missing in android sdk

I'm on windows7 x64, installed today's latest stable release of android sdk studio (through android studio bundle, since it's shipped together now apparently). I have properly configured the environment variables as you'll see above.
This is what I get when issuing the following command
$ cordova build android
ANDROID_HOME=G:\installs\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121
Error: Could not find gradle wrapper within Android SDK. Might need to update your Android SDK.
Looked here: G:\installs\Android\sdk\tools\templates\gradle\wrapper
And indeed, the "templates" directory doesn't even exist in my sdk install.
I've already tried the suggestions (setting the right path, uninstall/reinstall) of this question here but nothing applies to my case, and I find that manually copying and pasting packages is not really a solution, since there's a package manager in place.
If anybody has an answer as of today's android install, would be very much appreciated.
If still not working then copy all file from gradle\wrapper from Android Studio installation folder
C:\Program Files\Android\Android
Studio\plugins\android\lib\templates\gradle\wrapper
and paste it in your Android SDK gradle\wrapper then run same command.
E:\android-sdk\tools\templates\gradle\wrapper
This is a known issue; see CB-12544. For now you'll need to downgrade.
I downloaded Android SDK r25 manually and placed templates folder inside Android/sdk/tools. This solved the issue for me.
You can get it from https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip
For Windows:
https://developer.android.com/studio/index.html
Go to the section :"Get just the command line tools"
There is a link 'sdk-tools-darwin-3859397.zip' for Mac, Unfortunately that didn't have the templates folder with Gradle Wrapper. So for Mac users, i will suggest not to go for this zip.

Android studio offline installation

My windows XP development environment has no internet access. So I need to install Android Studio without internet connection. (Formerly I used 1-2 months IntelliJ IDEA 12 for android development)
The steps I made:
I downloaded studio 0.2.x installation files from developer site (http://developer.android.com/sdk/installing/studio.html).
I downloaded JDK and installed.
I already installed Android SDK package installer, downloaded API files and installed that files by using this package installer. (http://siddharthbarman.com/apd/)
I tried to create new project. I get "gradle" error. It seems like gradle is bundled inside studio but because of error exists, I downloaded gradle-1.6.zip from their website. (http://www.gradle.org/downloads) I added gradle\bin to my PATH environment variable.
Then I still get new errors that maven is missing. It seems like I need to download maven but I even don't know the version.
Can you write step by step that how many more programs / libraries should I download to get Hello world from Android studio and Android emulator ?
Note: I download files from a machine that has internet connection, copy them to flash disk and move to my development machine.
There is no need to download Maven. Android Studio only uses Gradle. However, the first time you build your project, you'd need to have a internet connection so that the Android Gradle plugin and all its dependencies are downloaded and cached on your local disk. With an active internet connection, do:
$ cd /path/to/project
$ /path/to/gradle assembleDebug
Once that works, then you shouldn't need an internet connection.
Android Studio will eventually support such an offline mode.
Android Studio 0.4.0 now includes support for offline:
http://tools.android.com/recent/androidstudio040released
"You can now open the Compiler > Gradle options and enable Offline mode, which will tell Gradle to ignore update-to-date checks"
It doesn't work offline for creating new projects, so this is what I do and it works 100% offline!
Download Gradle and setup Environment variables
Create/Load project in Eclipse
File > Export
Select 'Generate Gradle build files'
Select project
Open AndroidStudio or IntelliJ13
Import project
Select 'Create project from existing sources'
Done!
But I preferred to use 'android create project' command, then setup 'build.gradle' file manually.

ERROR: dump failed because no AndroidManifest.xml found

When I try to upload an application to Android Play store I get the following error:
ERROR: dump failed because no AndroidManifest.xml found
Steps that I took:
new HDD, install clean jre, jdk
download Android eclipse bundle - latest version today
make a new project, sample. simple hello world
sign it with the wizard, create a certificate etc.
try to upload it on the market...=ERROR!
I tried many combinations, different eclipse versions. Even to sign it manually. It doesn't work.
If I try to run aapt dump badging I get the same error.
Just write in the terminal
flutter clean
Just delete app.apk file from: /build/app/outputs/apk/app.apk.
Visual Studio will create a new correct app.apk file.
I dont know o 'why' of this.
I faced this problem using Visual Studio Code in a Flutter project and Im posting my solution because it can help others.
I just run 'Flutter Clean Project' and then I run the project.
All works again!
In my case the problem was with the filename: I accidentally (subconsciously) renamed it to .apk, when it should be .aab 🤦
following points are need to be taken care of while uploading file on
android market
"android:versionCode" attribute from AndroidManifest.xml is proper.
"android:versionName" attribute from AndroidManifest.xml is proper.
The package name is very unique,. Because all the apps on android market are separated by the package.
see all this is in place....
taken from while uploading file to android market error
I had this issue suddenly as well,
my solution was
flutter clean
flutter build apk
and it started working again
OPTION #1: Slow down an re-read every step. (Source).
Basic Setup for Signing.
Before you begin, make sure that the Keytool utility and Jarsigner
utility are available to the SDK build tools. Both of these tools are
available in the JDK. In most cases, you can tell the SDK build tools
how to find these utilities by setting your JAVA_HOME environment
variable so it references a suitable JDK. Alternatively, you can add
the JDK version of Keytool and Jarsigner to your PATH variable.
...
Eclipse Users
If you are developing in Eclipse/ADT (and have set up Keytool and
Jarsigner as described above in Basic Setup for Signing), signing in
debug mode is enabled by default. When you run or debug your
application, ADT signs the .apk file with the debug certificate, runs
zipalign on the package, then installs it on the selected emulator or
connected device. No specific action on your part is needed, provided
ADT has access to Keytool.
OPTION #2: Test the features required by your application with an unsigned '.apk'. (Source).
You can use the aapt tool, included in the Android SDK, to determine
how Google Play will filter your application, based on its declared
features and permissions. To do so, run aapt with the dump badging
command. This causes aapt to parse your application's manifest and
apply the same rules as used by Google Play to determine the features
that your application requires.
To use the tool, follow these steps:
First, build and export your application as an unsigned .apk. If you
are developing in Eclipse with ADT, right-click the project and select
Android Tools > Export Unsigned Application Package. Select a
destination filename and path and click OK. Next, locate the aapt
tool, if it is not already in your PATH. If you are using SDK Tools r8
or higher, you can find aapt in the /platform-tools/ directory.
Note: You must use the version of aapt that is provided for the latest
Platform-Tools component available. If you do not have the latest
Platform-Tools component, download it using the Android SDK Manager.
Run aapt using this syntax:
$ aapt dump badging <path_to_exported_.apk>
compile it & export the project under Linux (eclipse)
switch to InteliJ Studio (recommended)
It seems that from time to time there is a problem with eclipse under Windows 7,8.
flutter clean && flutter run
also works
I'm using VScode.
What happened:
After dart update, there was a permission error on flutter.bat
Solution:
Locate flutter.bat and give Full controll.
Open a cmd with Admin privileges, locate the folder that you are doing the development.
use 'FLutter clean' command (do not use vscode Terminal)
rerun app using 'Run without debug'
run flutter clean then flutter pub get. Then run your application, it should work
Error while run xamarin.uitest on using android sdk build tools 29.
Problem solved by changing android sdk build tools to 28.
I have same problem and solved by deleting all folders containing apk files in the location -
D:\FLUTTER\MY PROJECTS\SAMPLE\myapp\build\app\outputs.
if any folder is found access denied then force delete the folder or restart your system and try deleting the folder, then rebuild the app. It will work.
Go to the directory build/app/outputs/apk/debug , and the directory build/app/outputs/apk/flutter-apk . Erase the present files, once the compilation has run these files will rebuild and the error will disappear!

Categories

Resources