I'm working with an Android Project which does not have Gradle. It is an old-style structure project which has not been updated for using Gradle.
I'm trying to find the way of adding Crashlytics but I cannot find a way.
Is there any easy way to add crashlytics without Gradle?
Thanks.
Are you using Android Studio?
All the ways you can integrate are listed on Fabric's download page
If you are not using gradle, I guess it's still a Eclipse project. And Crashlytics is now part of Fabric, so I guess it's Fabric too what you are using.
About Eclipse, I'd recommend migrating it to Android Studio and take advantage of Gradle, but anyway, the steps would be:
Clip on Help -> Install New Software
Click "Add..." and add a new repository with the name Fabric and in the location, type in https://fabric.io/download/eclipse.
Look for "Fabric" and check its checkbox
Install it, restart eclipse, and you should be seeing a new blue icon in Eclipse's toolbar, for Fabric.
Edit: for using the library files (jar and aar) directly, in a IDE independent way, or with maven, the artifactory repo for twitter can be useful: https://twittersdk.artifactoryonline.com/twittersdk/webapp/home.html?3
There, you can find crashlytics libraries: http://twittersdk.artifactoryonline.com/twittersdk/webapp/search/artifact/?4&q=crashlytics, and also fabric: http://twittersdk.artifactoryonline.com/twittersdk/webapp/search/artifact/?5&q=fabric
For every dependency, Twitter's Artifactory help with code for Ivy, Maven or Gradle integration.
Related
I have been trying to get the facebook sdk v4 to work with my existing libgdx android project. Here are the steps i took:
ยน. Imported facebook android sdk v4 as gradle project to my workspace. Went well
Edited my android projects properties to include facebook sdk as library. Didnt work,couldnt import classes
Reverted 2nd step and added project to java build path. Didnt work
Added individual jar files as dependencues. Worked but not all classes could be imported maybe the one that were not included in jar?
Now I am totally confused as most of the topics online refer to older sdk.Please guide me
You can update your libgdx project to Gradle using https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle. Then you can add a dependency to the facebook-android-sdk artifact as described in 4th and 5th step here: https://developers.facebook.com/docs/android/getting-started#androidstudio.
I am currently developing an Android application and I'd like to use Graphhoper 0.3 embedded in the application (I have no way of setting up a server).
I am working with Android 4.0, Eclipse Kepler, Maven 3.2.1, Android for Maven Eclipse 1.0.1.
I first tried to pull branch 0.3 and set the "core" folder up as an Eclipse project, then adding it in the Build Path of my android project. I also tried to use the graphhopper-0.3-android.jar directly.
Android Project Main Activity onStart():
GraphHopper hopper = new GraphHopper().forMobile();
Unfortunately, everytime I got the following error:
java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory
It does not pop in a regular Java project; only in Android.
I've tried to add the slf4j JAR's to the build path, with no success.
Any help would be greatly appreciated! It's my first post here, and I really don't know what I could try more. If you need any more information on my setup or anything, please ask!
Edit
Complete solution in comments of the validated answer.
Because you are trying to use Graphhopper directly, the Maven is not downloading all the dependencies of the Graphhopper. In order to fix this, you should either add the Graphhopper as Maven dependency, or try to resolve the dependencies 'by hand' - i.e. by adding missing classes to the build path and exporting them to the APK (if you are using Maven, then simply add the dependencies to the pom.xml without scope tag).
I am trying to integrate new relic SDK into my app, and the problem is that the code is old and wasn't ported to gradle and we don't have time to port it. So when we try to add the new relic sdk into the project structure as a library is not working and it's throwing me an error that I can't get any feedback, the error is the following.
Failed to detect New Relic instrumentation. Something likely went wrong during your build process and you should contact support#newrelic.com.
NewRelic provides a video on their page for proper import in ADT/Eclipse. It is available on this page: https://docs.newrelic.com/docs/mobile-apps/android-installation-and-configuration
Generally, after adding a .jar to your library directory, you must set your build path correctly. Right click on your project, select Build Path -> Configure Build Path and make sure that the .jar appears in the Libraries tab and that it is checked in the Order and Export tab.
Anyways, regarding about the problem of not been able to build in android studio is fixed, but also I were able to import my code to eclipse and make it run and after that I make it work also in android studio without gradle. I have submitted a ticket to new relic just in case they are willing to create a new tutorial for people, like me, that are not using gradle an make it work in android studio.
This is the important line:
-javaagent:/path/to/newrelic-android-3.330.0/lib/class.rewriter.jar
you have to add this into your compilation parameters, and the only way to do it is through the preference of the android studio, instead of your project preference.
Try to find a way to add this command only for when we are building this project and not other ones. Let see.
I have downloaded calendar project from https://github.com/android/platform_packages_apps_calendar and now I'm trying to run that project. I imported the project to eclipse via new --> Android project from existing source, it imported successfully but I'm getting a red exclamation mark in project, like this:
When I went to properties > Android I'm seeing this:
It looks like the project is using some libraries but is not able to find in the workspace. How can I fix this?
You may to add the following dependencies as well.
https://android.googlesource.com/platform/frameworks/ex/
https://android.googlesource.com/platform/frameworks/opt/colorpicker/
https://android.googlesource.com/platform/frameworks/opt/calendar/
https://android.googlesource.com/platform/frameworks/opt/datetimepicker/
https://android.googlesource.com/platform/frameworks/opt/timezonepicker/
I was able to build the AOSP Android calendar.
Ye Lin Aung give you almost all the neccesary, but you will need also "chips" library. This library is not included in the last master aosp necessary packages , but its in their repository in the old versions.
You can find the neccesary libraries in the next repository:
https://gitlab.com/Purcallas/AOSPCalendarExtensions/tree/master
Or in the Google repository (as say Ye) you can find chips and common values:
https://android.googlesource.com/platform/frameworks/ex/+/ics-mr1
remove all the library from here and import each and every one in your project workspace and then after add the library.
I am using combination of Maven and IntelliJ Idea.
Although javadoc and sources are shown using Android Module in Idea, I can not see any of them using Android maven.
Any help, how to show sources also with Maven in Idea? Should I set it in pom.xml or somewhere in Idea preferences?
Please check the related issue for the workaround:
manually attach the sources to "Maven: com.google.android..." project library
See the Module Dependencies for details how to do it.
First of all make sure you downloaded the sources from the Android SDK for the target that you are using in your project.
Now in IntelliJ, under Project Structure (CMD+;) => Modules => Dependencies you should be seeing "Maven: com.google.android:android:4.1.1.4" and also "Android X.X Platform (java version... )". Select the "Android X.X" and press the up arrow at the bottom to move it up so it's at the top.
Now you should be running with the SDK module which include the sources