Why are my gradle dependencies in Android Studio not being cached? - android-studio

I downloaded Google's Android Sceneform example project, solarsystem, under the samples folder in the hyperlink. I intend to use it as a base for an AR Application I need to create. However, I need to take the project to an offline environment.
While I am connected to the internet, the project builds without issue. However, when I go offline, I end up with a
No cached version of com.android.tools.build:aapt2:3.4.1-5326820 available for offline mode.
I have no problem syncing the project, but I am unable to build anything. I have tried downloading the appt2 dependency from Google's Maven Repository directly and including it in my project's dependencies in the build.gradle folder but I still get the same error. My project MUST be built offline.
I have also searched online for a few solutions, but none have worked for me so far. I found out that Google did remove the version of aapt2 that I am using, but I was still able to download it from their repository. As I understand, Android should be able to build my project so long as the dependencies have been cached. I am just trying to identify the problem at this point. Why has this one dependency not been cached and why despite including it's jar directly have I not been able to run it?

Related

Importing LIBGDX library gdx-backend-android.jar into Android Studio Project

After a hiatus of a couple of years I'm picking up Android development again.
I installed the newest Android Studio(4.1.1) with the latest Android SDK version (Android 11, API 30). After that I created a new project with gdx-setup.
If I add the old java source to my newly generated project I get this error:
error: package com.badlogic.gdx.backends.android does not exist
I'm not sure how to add this jar into the new project. In the Gradle configuration I see mentions of the backend, but it's not available.
I also downloaded the 'gdx-backend-android.jar' from the nightly build and put the jar in the Android library folder, all to no avail.
Does anyone actually know how to correctly add this dependency into my project?
I added the jar but still have an error, don't mind the other errors, I first need to fix the GDX import.
The project dependencies are managed by Gradle, so there is no need for you to directly touch any .jar files at all.
The most likely issue you're facing is that you are trying to use Android-specific classes from the core module, which is platform agnostic.
In a typical libGDX project, you do almost all your game code in the core module so it can easily be compiled for any platform. The code you showed above would be in the android module, but your LiveWallpaperStarter class would be part of core.
Some might say there's no reason to use core at all if you're making a Live Wallpaper, since it can't run on any other platforms besides Android. But there is some advantage in keeping the rendering in core so you can test in a desktop game window, because you can more rapidly compile and run on the desktop. This library has some tools that make it easy to wrap your rendering code in a class that lets you simulate a live wallpaper on desktop, for testing.

cordova integrate files into the prject

Good day everyone; having project and must update to cordova 9.0.0 and at least to android 8.0.0 to publish in google play, when i try to build the build fail because (Could not resolve all artifacts for configuration ':classpath'), the most likely cause is connections errors the question is
can i set a proxy program (say for example tor) through the node.js command prompt (and not through android studio because it doesn't work)
if that not possible, if i manged to download the required files manually (example bundletool-0.13.2.jar https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.13.2/bundletool-0.13.2.jar) is there a way to integrate them somehow to the project as a work around
Thanks in advance

How can I uninstall a package that was installed by Nuxeo Studio?

I used Nuxeo Studio for research purposes and created a Schema and added it to my local server using the Nuxeo Chrome Extension is hot deploy.
Now, what if I need to uninstall the package?
I tried to use the ./nuxeoctl mp-uninstall <package-name-installer-by-studio> to achieve that. Apparently, it worked. However, my local server fails to start again and, when the hot reload is called again, it hangs up saying:
data/myWorkflow.zip not found in <path>/nuxeo-server-10.10-tomcat/nxserver/bundles/<package>.jar
also:
org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] org.nuxeo.ecm.core.api.NuxeoException: Failed to invoke operation: Service.HotReloadStudioSnapshot
I am led to think that this is badly done/programmed: there should be an error proof way to uninstall the packages installed by Studio, since Studio won't be the only tool to be used in a big project.
I managed to install/uninstall the package with another strategy: I didn't hot reload it with Nuxeo Chrome Extension. I just downloaded the package and installed it using Nuxeo-CLI. Then, I was able to uninstall it without any issues.
I noticed that this gives me more control since I can keep the package that was generated, I can inspect what changes were made (and understand what happened in a more open way), and then install/uninstall it manually.
Since I didn't figure out the problem that is with Nuxeo Chrome Extension, I chose not to use it for a while.

Xamarin Android build fails in AppCenter (Azure) with Error APT0000

Xamarin Android project is built well locally on Windows/Mac, but fails on AppCenter/Azure pipelines with weird errors like:
Error APT0000: resource style/Theme.AppCompat.Light.DarkActionBar (aka com.companyname.build_testing_andx:style/Theme.AppCompat.Light.DarkActionBar) not found.
Error APT0000: style attribute 'attr/colorPrimary (aka com.companyname.build_testing_andx:attr/colorPrimary)' not found.
This mostly looks like lack of necessary libraries to restore by Nuget.
As it appeared after long investigation, and no matter how the solution sounds dumb, but the solution might save some time for someone.
The reason such projects can't be build on AppCenter/Azure (and that might be related to any other Visual Studio project) is that Nuget packages not being restored successfully.
The problem is that when using Nuget task, it doesn't indicate any issues. It just finishes well.
But it happens because the sources don't include *.sln file, thus Nuget doesn't have a point where to start from for the packages restoring.
Sometimes it might happen when this file is just not included into sources pushed to repository by number of reasons.
*(It's weird because the builds often project-oriented, and when working on Visual Studio it automatically creates the .sln file (not necessary around the project folder), so sometimes it might just be not included and you have no idea what's causing the errors above).
So, just to be sure you've got your *.sln file added to your repository and it's available for the AppCenter/Azure build.

Adding Packages to build so nuget doesn't need to retrieve each build

I will explain this as best I can!!
I have a large project with a build that kicks off automatically after each checkin. This normally works fine, but this is the first time I have attempted a build that has included code using a library other than those already in the solution.
I have added the Microsoft antixss library (I got it through nuget on my local dev machine). When I checkin, the build fails as nuget on the build server is having trouble getting out to nuget through our proxy.
Obviously the best solution is to get this issue resolved, but it brings up a question of resilience - if our connection to the outside world is mashed, can I not do any builds?
This led me to thinking, is it possible to add libraries such as this antixss to the defaults that always appear in my build servers packages (like jquery etc?). Each build, this packages folder is cleared and replaced by the build process. At the moment, every-time I build the build breaks due to the proxy issue.
I really need to get a release out today, so was wondering if anyone could help me here? It seems silly that I need to go out to Nuget as the library exists on my local!!
Many Many thanks
Install your own nuget server behind the firewall/proxy and point to that as your default NuGet server.
I've used the free version of ProGet in the past as an easy to run a nuget server that also acts as a caching proxy for the main nuget gallery. It also means that if the main nuget server or your internet connection is down you will still have a nuget server that your build can connect to.

Resources