How to download aar and pom file from jitpack.io manually? - android

One of my clients has a restricted environment to fetch few transitive dependencies in the Android studio.
One of dependecy DSBridge-Android which is serving by jitpack.io is failing to fetch due to network restrictions.
I couldn't find the option to download AAR and POM files manually to put into project directly.
Any one has idea to download depenedencies manually which are serving by https://jitpack.io/
Thanks in advance :)

Finally, I found a solution!!
Open following URL format in browser then it will download respective jar/aar/pom/etc file. You can find the file path in the log file.
https://jitpack.io/FILE_PATH
Let me explain with one example:
Let's say I want the AAR and POM file of https://jitpack.io/#wendux/DSBridge-Android
Open the log file of the version that you want as follows
Scroll down till you find the Files: section as follows
Then copy the file path of the required file and open it in the browser with https://jitpack.io/FILE_PATH format. The file will be downloaded now.
Ex: https://jitpack.io/com/github/wendux/DSBridge-Android/v3.0.0/DSBridge-Android-v3.0.0.aar
Happy Coding!!

Related

archive artifacts for android apk jenkins

I have an .apk file in build/output/APK/debug/debug_app.apk. I am able
to generate built I want to Post-build Actions Archive and artifact
it for that I wrote one command to go Project directory and then in
artifact
I tried to add build/output/APK/debug/*.APK path but its not able to find path it say not found while .APK file is there. I want
to archive and artifact APK file when build is complete please
suggest me how to achieve this ?
Note that Archive the artifacts has an Advanced section there is a checkbox "Treat include and exclude patterns as case sensitive", as I see the "APK" vs "apk" would fail to match if you have that checked. Alternatively simply using build/output/APK/debug/. would get around that specific issue.
Please let me know if these suggestions help. :)

How to see the AndroidManifest.xml of my imported packages?

Let's say I have the following import inside my application build.gradle file:
implementation "com.facebook.android:facebook-android-sdk:4.28.0"
I want to see the AndroidManifest.xml of this package. How do I go about doing this?
You can check it in your AS,For example,I want to check com.android.support:design-27.0.2's AndroidManifest.xml file
step 1
step 2
step 3
Reedit for step 1
Download the aar by searching in this website :
https://search.maven.org/search?q=a:facebook-android-sdk
Then extract the aar file using 7ZIP and you will see the android manifest however, I believe you won't see the full file content due to some protections against reverse engineering.
You can download it as JAR instead and use some tools to try to decompile it.
You can find the aar file in the
cd ~/.gradle/caches/modules-2/files-2.1/com.facebook.android/facebook-android-sdk
directory, unzip the aar, you will get the file.

Properties file on Travis CI

I am building an Github Android project using Travis-CI however I have some files which have secret data which I don't want to upload it to GitHub (As it is open and anyone can view it).
In my build.gradle I have written code to load the *.properties file and extract values from it and I have not uploaded these properties files onto GitHub but I want that my properties files should be received when Travis-CI build is being made.
Is there any way I can do this?
Thanks for your help.
Encrypt your file(s). The process is explained in https://docs.travis-ci.com/user/encrypting-files

Robospice jars for non maven mode

I'm trying to make a build of a sample project (core-basic), without maven, just by picking the jars located in repository/dependencies/1.4.9/robospice and copying them to Android project libs folder.
The jars that I am copying are specifically these:
commons-io-1.3.2
commons-lang3-3.1
robospice-1.4.9
robospice-cache-1.4.9
However, Eclipse shows this error:
robospice-sample-core/libs/commons-lang3-3.1.jar' in project 'robospice-sample-core' cannot be read or is not a valid ZIP file
Moreover, I cannot access into the contents of the jars, WinRar says that they are corrupted or invalid.
So, what am I doing wrong? Can I really use those jar just by copying them to libs folder or do I have to do something more? Why does eclipse say that they can not be read?
(Thanks in advance. In spite of I know that maven setup for Robospice is strongly advisable, I'd like to know why this happens)
Downloading jar by means of right click on its file name --> Save link returns corrupted jar files. Clicking on "Raw" in the file details, return the correct file.
You must have made a mistake while downloading the files. They can be opened pretty easily with zipinfo on my mac. Download them again from the repo branch or pick the artifacts from maven central.

Error in creating a pdf file android

I am new to Android programming,my task was to create a pdf file in adroid
First I created a Java project using Eclipse (projectA) , wrote code in java to generate a pdf file using itext (Added jars to the project) and its working fine.
Now I created another Android project (ProjectB) , and added the itext jars (similar to projectA) and code, but it is not working properly
Error : Error generating final archive: Found duplicate file for APK: com/itextpdf/text/LICENSE.txt
Origin 1: /home/SudheerB/workspace-Ecclipse/NeedAnalyserTool13/libs/itextpdf-5.3.3-sources.jar
Origin 2: /home/SudheerB/workspace-Ecclipse/NeedAnalyserTool13/libs/itext-xtra-5.3.3-sources.jar
Can someone help me on this?
It is very simple. You are using jar files which have some common classes. so during the generation of apk file, duplicates files are being found.
just use one of the jar files. either "itextpdf.jar" or "itextpdf-xtra.jar". your problem will be solved.
Remove the sources jars from your project and at least that error should go away.
Seems like you're using the jars that are available for Java instead of the Android/GAE port. Please switch to using the official port for Android and Google App Engine. That will solve your problem. This port isn't available from SourceForge, you need to fill out the form at http://itextpdf.com/sales/ and they'll send you a link where you can download it.

Categories

Resources