Unity 2019 gradle build failed - android

I noticed that a lot of people have had this issue but I haven't been able to find a solution to it yet.
The main other places I found with almost exactly the same error, and recently, is here
When I simply try to install unity 2019.1 and the web GL editor component as well as the Android build component via the offline installer from the beta page, and attempt to build a basic empty scene to Android, after installing NDK and the SDK manually offline as well and pointing unity to the installations, then everything goes fine until the very end, but then it says "Gradle build failed..."
And there are about 26 errors that I can't copy now because I'm on a different device, but the main one is
"Could not resolve com.android.tools.build:gradle:3.2.0,.
And then could not get resource HTTP (...gradle-3.2.0.pom, basically)
So that link I mentioned earlier involved almost the same issue, but it's still unresolved. Basically, the unity staff guy implied that it's not possible to completely install unity offline, you would at least need to connect to the internet once to allow unity to install gradle to the home/.Gradle/cache, OR you can do it on another computer that can have unity, then copy over the cache folder.
The problems are, first of all, that even for that other guy who DID install unity and build an Android project on another computer with internet, it still didn't work for other reasons, but I'm just wondering on my case (and any similar case) where I don't have another computer that can install unity online, and the only unity capable computer is offline only, and unity is supposed to able to be installed offline via the beta components at least anyway, so how can I get the Gradle components set up?
Does anyone know where I can find a download of 3.2.0 Gradle cache?
Or is there any other solution anyone knows of at all?
I don't want to have to export the project every time then rebuild it in Android studio

Related

Build problems: Faulty Smali code on one machine/account working APK on another

I have two user accounts on Ubuntu 22.04, Android Studio (and all build tools installed on both. For my main account everything works, on the other, the Android app builds fine but behaves differently. This wrong behavior only occurs when building the app on my main account, but not when someone else builds it or the CI runner creates an APK.
It does not matter whether I build it from the command line or from within Android Studio.
I am desperately looking for an explanation or even for ways to debug this. Isn't there some command that prints all environment variables, all paths to all tools, configs, etc… involved in the build process to give me some clue as to what is going on?
This issue only affects building Android apps. Building other JVM-based software (Spring, even mixed Kotlin+Java sources, traditional JEE services) works perfectly fine.
I copied the project folder to other machines, set up a VM, and freshly checked everything out from git and the same reproducible behaviour occurs: Building on my main machine results in a runnable Android app, which exhibits bugs that do not exist in the source code or in the libraries used, building it anywhere else results in an app, which behaves as it should. We even verified that building the app on my main account produces different smali code compared to any other build setups.
I tried manually installing the Android SDK, tried managing it from within Android Studio installed from the JetBrains, flathub, snap store… no dice.
How to debug this?

React Native : How to avoid build error on different local environment over time

I'm in a company, and we have a lot of build problems when we put a new developper on an existing react native projects. We all know that it can take hours or even days before he start to work.
We use fastlane and jenkins for deployment but we dont use anything for the local aspect (exept yarn/npm of course).
I guess those problems are caused by different version of build tool (cacoapod, gradle, react-native-cli ...) or different environments (even if we're all working on macos).
I was wondering if any of you have faced some similar situations and if you have some tips.
Maybe something like a "build server" can exist, or tools to automate build tool installation / setup with given versions (something like a package.json for build tools). Or other things that can help us.
A brief list of things that i often face:
Android: impossible to run anything via react-native command (no real debogger) Activity is not found
iOS: The app launch and close a little time during splashscreen
fastlane iOS: The build is working sometimes but it is really fortunate. It says that there are multiple reference to *.a files.
But my collegues face other problems. Our goal is to find a solution that can live over time. Like what a well configured docker can do with web project.

I want to use Fabric/Crashlytics with ADT / Eclipse

I have not migrated my project to Android Studio yet, but I still want to use Fabric/Crashlytics to manage crashes of my app. I am using the Android Developer Tools (ADT) 23.
I tried the Fabrics eclipse plugin and it installs and starts fine. Then I login and the plugin presents a "Select kit to install" dialog. But the buttons are inactive and they only say "checkin...". After a few seconds I am getting the login screen again. I tried a few times it doesnt work that way, since the eclipse plugin is discontinued i guess i can not hope for any support.
So is there a way to download an sdk or a java lib somewhere and perform all the necessary steps myself?
Here is a step by step to do it manually and it seems easy, if your setup has gradle support:
https://www.fabric.io/kits/android/crashlytics/install
But I dont have Android Studio, so the build.gradle is no good to me.
I added a few SDKs and libraries of other companies to my project and I never had so many problems like this.
Maybe someone can aid me to the right path?

Android build environment

I have been working with standard android for some time. Recently I have been building android sdk for windows and find some interesting things in Android build env. There is a command called lunch which can be used to list all available targets to build. However, it does not list sdk and its variants,even though they are valid options.
Does anyone know why is that the case?
Also can I build any specific module in Android sdk without building the whole sdk. (It could be a great help as I dont wanna build the whole sdk, if I gonna do a small change in one component.)
Thanks
Under the hood, lunch uses make, so if some pieces of SDK do not change, they won't be rebuilt.
My speculation about your first question: rebuilding SDK was never considered a major task of lunch. It is most often used to port or mod the system and produce an installable system image, and receive the ADK as by-product. Later, people realized that often (with root access to the device) you can iterate over one component without need to reinstall the whole system image.

Use Sublime Text 2 to develop Phonegap applications for Android

I've been using eclipse to develop Android apps with phonegap until, a few weeks ago, I decided to try Sublime Text 2. I found it to be so much better than the eclipse editor so I would like to keep using it. Only thing I'm missing is a quick way to test the app on the device inside Sublime.
Luckily, someone else also had the same idea and developed a plugin for this:
https://github.com/Korcholis/Andrew
Sadly, I cannot get it to work, I installed ant and pointed the plugin to adb but then nothing happens when I try to create a new project (and there is no error message in the console).
I also found this other plugin:
https://bitbucket.org/ucomesdag/sublime-android
But I have no idea on how to install and run it.
Did someone else found a way to do this?
A quick update into 2014.
As of PhoneGap Cordova 3.0, it is no longer required to develop Android apps via eclipse. You are free to use any code editor or IDE you wish as app building is done independently from eclipse via a simple command line.
cordova run android to package the .apk and install on any active devices detected by adb or
cordova build android to package the .apk only.
In your case, you can keep using Sublime and pop in the cordova run android command whenever you ready to go on a test run.
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse).
Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed.
On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably he means JDK?) in your hard drive. Which is probably a hassle because Windows typically installs stuff to "Program Files" and in code, that turns into "Progra~1" because of the space. In the link I give you there is another approach to it, so when you install the JDK set a folder that has no spaces in its name, like c:\java\jdk1.6.0_02 or something else that strikes your fancy. The problem you could be having with Andrew is that it isn't finding the jdk in your hard disk.

Categories

Resources