First up, I'm totally new to the Android ecosystem and mobile app dev in general. However I am a veteran C#/C++/JS/Java app and web dev. So currently my corporate firewall has rules to prevent our work PCs from connecting online. I'm supposed to be doing android app dev fully offline. I got Android Studio installed and created a test app, however gradle refuses to build offline, even with the "Offline work" option ticked. If I build an app on my internet-connected laptop all goes fine. If I copy that app to my work PC, gradle crashes with "cannot find module XYZ in gradle cache". I tried copying over the<user>/.gradle/caches/ dir from my laptop to my PC but that doesn't work either.
So, I'm left with no option but to attempt to build my android project without gradle. I'd like to use the Android Studio IDE if possible, else I'd fallback to SublimeText. So my question is, how do I build, debug and emulate android apps without gradle?
Things I've tried:
Creating a hello world app on my laptop, building it and emulating it. Gradle updates all its libs and stuff, and I used the AVD Manager to download an AVD image an setup an emulator.
Copying over the test app project dir to my work PC
Copying over the updated Android SDK dir to my work PC (with the AVD image, etc)
Copying over the gradle caches to my work PC
At least you need internet connection once for the first build, then you can go to settings & enable offline. then you can build without the internet connection.
Android Studio makes life easier. Anything other than that is going to very hard.
You can use this gist to download dependencies to a local folder. You can then use:
repositories {
maven {
url uri('c:/path/to/repo')
}
}
To work offline
Shameless plug: I wrote a series of scripts to build a Java/Kotlin Android app, including dependencies, without Gradle. There's a separate script to download packages, which is configured to look for AndroidX packages by default but you can provide it a full URL instead. After that point, running the other scripts is enough to build the app offline.
Link: https://github.com/jbendtsen/tiny-android-template
You can do it through the Intellij with android plugin, however somewhat unsupported features are still existed.
Mostly I work on Android Studio sometimes I'm using IntelliJ community version.
please try...
Related
I have tried a lot.
I have connected my phone to the android studio to run the app onto. For some reason it will install and run the old version of the app. When I run the app on the emulator on the computer it works perfectly.
I have tried:
Deleting the build folder
Cleaning solution
Rebuilding
Copying the entire project into a new project, building it from scratch and rerunning it (still runs the old version of the other app).
Praying to the coding gods.
Has anyone else had this issue?
All I want to do is run my app on my phone as I'm testing.
I am being pestered by eclipse when I open the program. I get two error messages; "SDK Platform tools component is missing! ..." and "Failed to get the required ADT version number from the SDK. The Android developer toolkit may not work properly".
Both messages give me the option to open the Android SDK manager. When I attempt to open the Android SDK manager from eclipse, I get an initialization and then nothing happens.
I'm aware this is a common problem. Many solutions say to find the Android SDK manager in the SDK directory, though I can't find it anywhere there. The path I am using is "C:\Users\Ant\AppData\Local\Android\sdk".
When I attempt to open the SDK manager from Android Studio, I get something come up, though I have no idea if it is the Android studio version of the SDK manager or not.
All I want to do is install some packages to get everything running smoothly. I have the feeling that I need to open the SDK manager from eclipse to do it though. Is this correct? Is there anything else I can do?
You should go and create the proper environment setup, It seems there is a confusion between Eclipse and android studio working env. Please make sure to install separately the working env. SDK are normally hidden files make sure you are suppose to see hidden files in your computer.
Thanks,
Ashish
I am new to Android app development. I have a source code and would like to modify some xml/java codes. Can I use the Brackets editor for this? I don't want to use Android studio as it's a bit complicated for me.
If you really want to, you can edit source files in an editor of your choosing and build the app manually via terminal. Actually, this is how it's done on Continuous Integration systems.
Typically Android projects are using Gradle build system, and come with Gradle wrappers. After you are done editing, you can just invoke it to assemble the release APK signed with proper keys as discussed in How to create a release signed apk file using Gradle? thread. Note that it would require you having downloaded Android SDK and configured your paths properly, which would be tricky for a beginner, yet completely automated in a proper IDE.
If you are unlucky, it could be an old Eclipse project, or using some less popular build system, like Ant.
As you are new to Android development, I think you should go the more simple route and just download Android Studio and import your project.
I received a full working project's sourcecode for an app written in java.
to set up my win7 machine I followed these steps:
http://www.javacodegeeks.com/2013/03/setup-your-java-development-environment-in-windows-7.html
i opened eclipse and need to work on this project, but have NO idea how to pull in the project with all its files so I can actually run it and test it.
I need to make changes to this project.
the folder is located in MyDocuments folder called Budget
within Budget I have:
.metadata
dev (see screenshot of what is in this folder)
can some one help me setup everything? I have never done this, I am only familiar with XAMPP
i also looked at
How to open an existing project in Eclipse?
i tried it and get files and filders in the navigation pane, how from here?
What you have installed is JavaSE SDK plus a lot of other stuff for regular Java development. But in your screenshot I can see that your project has a Blackberry and Android versions. To develop in these platforms, your Java SDK install is not enough. You'll need to setup both BB and android development environments in your machine. You'll probably need:
For BlackBerry:
Blackberry Java SDK (check which version was the BB subproject made for)
Eclipse with BlackBerry Java plugin. There used to exist eclipse versions with the BB plugin already installed available for download in Blackberry's site. If you don't have one, this is the one you want. And if you already have an eclipse, resist the temptation to just add the BB plugin to it. The BB plugin messes up with almost every other plugin you might already have. Also each plugin was made to a target eclipse version, so just download the bundled eclipse+plugin from BB and be happy:
http://developer.blackberry.com/bbos/java/download/
Also some simulators for your target platform. I think the eclipse plugin comes with one already installed. They are really slow though, so you might want a real device instead.
For android:
Android SDK
An eclipse with the ADT plugin, if the project was made with eclipse, or the newer Android Studio. This eclipse plugin is better made than BB's so you won't need a dedicated eclipse like in BB's case.
Simulators are made with the ADM tool included in the SDK.
Good luck!
I have an good eclipse and ADT on it and everything is good. but i have to transfer it to my new computer and I m worry about reinstalling google and eclipse plugins again.
please help me to find a way for offline transfer of all my eclipse, plugins, android sdk and android emulator
for using in the same architecture and also the same OS, simply copy eclipse and sdk folders. if you want your emulators too, in linux, copy ~/.android folder too.