I am trying to install NewRelic's mobile agent for Android app. I followed their instructions, and have set up NEWRELIC_HOME (pointing to agent directory) and ANDROID_HOME (pointing to Android SDK location). When I run nrandroid-setup from the app's directory (as suggested), I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: com/android/utils/ILogger
Caused by: java.lang.ClassNotFoundException: com.android.utils.ILogger
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: com.newrelic.agent.install.Main. Program will exit.
error: java returned a non-zero status code
I have watched their install video, and it is very simple, so not sure why my installation does not work (only difference, I run under 64-bit Windows 7, they are using Mac)
I think you might have opened a ticket with New Relic already, but in previous instances this problem was resolved by checking your environment variables and updating the SDK (I include updating the New Relic monitoring SDK for good measure but it's not likely to be the cause)
1) Verify that you've declared NEWRELIC_HOME and ANDROID_HOME, generally by running an 'export' command to make sure both are declared. Then make sure you can navigate based on those variables and see they lead to the right place. Please include the results of 'export' in your reply if you're still having trouble.
in PowerShell use Get-ChildItem Env:
in Terminal use export
from cmd use SET
2) Update your Android SDK
To update the ADT plugin for Eclipse to the latest version, follow these steps:
Select Help > Software Updates > Find and Install....
Select Search for updates of the currently installed features and press Finish.
If any update for ADT is available, select and install.
3) Make sure you have the latest version of New Relic for Mobile Apps for Android.
The newest version of our Android agent is available by logging in at rpm.newrelic.com and going to Mobile>"See Instructions" or "Add a new mobile app"
Notably, the Android SDK isn't listed on our requirements page, we're just realizing that this has caused some users trouble, and I do think that step 2) will resolve the problem. I'm also going to update our documentation with that requirement once we've got it all tested and verified.
Basically, all the things that Toby said and also check the Java version you are running. In my case, I could not build with java 1.6.0_32, it only worked when I upgraded to version 1.7.0_13
You have to change your android sdk it may be becoz your android sdk_> tools->sdklibs.jar have no logger class please change the sdk with latest i have change the sdk and solve my problem.
Related
All packages are not available for download!
The following packages are not available:
- Package id sources;android-24
Am trying getting data from database by using of web services, when am running the application getting an above shown error.
How can I resolve this issue in the android studio?
Open SDK Manager -> SDK Platform
Check on Show Package Details and Sources for Android ... then download
The popup error is not related to the exception you got on your application. Api 24 source code is not fully available. Hence you got the error. Change complieSdkVersion and targetSdkVersion to 23 and sync the gradle.
I just closed my IDE then restarted my computer. When I opened the IDE the error was no more.
Make sure you have good internet connection, as the error might be caused by a lack of internet connection preventing the IDE from reaching the site.
Check if the SDK version is installed on Android studio for that particular Android device. e.g. If Android Device has version 4.3 then check if SDK for this version 4.3 is installed, you can check it through Android Studio SDK manager. If not installed then install it complete.
Restart Android studio, reconnect the device, That's it
A thing I ran into, check to see if you have more than one android sdk on your box. I'm not sure if it was confusing Android studio or not, but I had one previously installed under Program Files. I ended up going into the AppData\Local\Android version used by Android studio and adding stuff I needed manually running the SDK manager as administrator.
This means that you can't reach the download site, and it has many reasons one of them is that you are in a country in wich the American laws won't allow to use such technology so you have to use a proxy program and to configure the sitting in your Android studio to use the proxy gate and port.
I'm trying to create a test app using the New Relic library in Eclipse on Ubuntu, Android 4.2.2, New Relic SDK 2. When I run the app I get following error:
E/com.newrelic.agent.android(31733): Failed to detect New Relic instrumentation.
Something likely went wrong during your build process and you should contact support#newrelic.com.
I followed the New Relic SDK installation tutorial for the example app exactly, but I still get this error, and no data is sent to New Relic.
Any idea what might be the problem?
I was getting this error until I upgraded Eclipse to Juno. Apparently the New Relic plugin isn't compatible with older versions of Eclipse.
I had the same problem on my Windows 8 64-bit. But I was already compiling with the Android API 18 compiler.
My problem was solved by launching Eclipse with the -vm switch to point to a Java JDK 1.6, 64-bit install. (I was running off a JRE 1.7 32-bit install before.)
C:\java\bin\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.6.0_45\bin"
i've found that as i load other projects in to my environment that i get this error as i try to launch them. it could be just a simple example that comes with a library. my solution to this has been to right click the project and hit the new relic button to install it in the project. all this does is simply insert their jar and link it in... pretty harmless. there is probably a better way but this works for now.
The problem is apparently the compiler platform version. After switching to Android 4.1.2 everything went perfect.
I contacted New Relic on this matter but didn't got any reply yet. Will update the answer when i do.
I'm trying to install Xamarin for Android and I'm having a really weird issue and I can't find any help anywhere.
Once the installation starts and I click on Next button in the screen with the answer about if I want to collect information, it doesn't do anything. Checking the log file it always cancel the installation due to an internal error, I will copy the log section that's giving me the information:
[287C:256C][2013-01-13T14:02:06]: Caching bundle from: 'C:\Users\MAXIPO~1\AppData\Local\Temp\{e9ab888e-6304-4ba3-b36a-b1a350d36592}\.be\XamarinSetup.exe' to: 'C:\ProgramData\Package Cache\{e9ab888e-6304-4ba3-b36a-b1a350d36592}\XamarinSetup.exe'
[287C:256C][2013-01-13T14:02:07]: Registering bundle dependency provider: {e9ab888e-6304-4ba3-b36a-b1a350d36592}, version: 3.0.0.0
[2464:19E4][2013-01-13T14:02:07]: Prompt for source of container: WixAttachedContainer, path: C:\Soft\Android\XamarinSetup.exe
[2464:19E4][2013-01-13T14:02:07]: Failed to resolve source for file: C:\Soft\Android\XamarinSetup.exe, error: 0x80070642.
[2464:19E4][2013-01-13T14:02:07]: Error 0x80070642: Failed while prompting for source (original path 'C:\Soft\Android\XamarinSetup.exe').
[2464:19E4][2013-01-13T14:02:07]: Failed to acquire container: WixAttachedContainer to working path: C:\Users\MAXIPO~1\AppData\Local\Temp\{e9ab888e-6304-4ba3-b36a-b1a350d36592}\4675EB82A6A7F3C48F80571AB6E8495BD1C803BA, error: 0x80070642.
[2464:2930][2013-01-13T14:02:07]: Error 0x80070642: Failed while caching, aborting execution.
Failed to resolve source for file : XamarinSetup.exe. This file doesn't exist ever, I've never found it even refreshing the folder over and over during installation in case it's deleted during the process. I can see it starts copying files into the temp folder, and suddenly all of them dissapear (I'm sure due to the cancellation). I'm running it in Windows 7, any idea? I've been looking for a solution for days even changing permissions in my system, giving access to guest, my user, administrator, and so worth to all the paths just in case.
Regards.
Despite of the problem itself I could finally install everything. Thanks to the Xamarin support I knew the automatic installation doesn't work always, so it's much better to install every package manually. So the instructions they gave me are the following ones:
It looks like a manual installation would get the trial version of Mono for Android installed. Please follow the below instructions:
Please download and install packages shown below in the order listed:
JDK 1.6: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download-1501634.html
Please choose the jdk-6u31-windows-i586.exe installer from the list above.
Android SDK: http://dl.google.com/android/installer_r20-windows.exe
After the main installer is done, please open the SDK Manager and install the following platform APIs: 7,8,10,12,14
GTK#: http://download.xamarin.com/Installer/gtk-sharp-2.12.10.win32.msi
MonoDevelop: http://download.xamarin.com/monodevelop/Windows/MonoDevelop-3.0.5.msi
Mono for Android SDK: http://download.xamarin.com/MonoforAndroid/Windows/mono-android-4.4.55.104956787.msi
You can skip steps 3 and 4 if you don't need/want to use MonoDevelop and use VisualStudio (2010 Professional or better) instead. In that case you must have VS installed before proceeding with step 5.
Always keep in mind to install the API's in the step 2, also JDK 1.6 is not the last one anymore so it will prompt you to install 1.7 instead of this one.
Installing fine, however getting this error when trying to view available packages....
android sdk failed to fetch url reason: Invalid argument: connect
Any ideas?
I have noticed that Android SDK Manager does NOT like java 7 update 1. I uninstalled java 7 and used java 6 update 27 and I am able to connect just fine and get the packages.
I don't know what it is but give that a shot for people having the same issue.
I Ran in to this same problem when they came out with the newest version of the platform tools. they changed the repository address. or in more plain terms, they changed the address of the update server between now and the last time you updated so now the updater can't find the server. What I had to do is uninstall the sdk, and download a new starter package and install that. Also I found the new starter package demands the most current JDK so if you like me haven't updated that recently do that first!
myself I had to rip out the SDK,the JDK, and Eclipse download new installers and reinstall them all to get the update to work properly.
I'm a n00b developer at my second attempt to use the Android SDK. I'm
developing on the Mac platform and I've noticed that the latest
version of the SDK doesn't include anything except the tools (so I
have no plugins, no targets to choose from inside the package I
downloaded).
So I tried to use the Android SDK and AVD Manager to download and
install some, however, I got this error:
Failed to fetch URL https://dl-ssl.google.com/android/repository/
I went to the settings and checked the box to force fetching via HTTP,
but no result. I was suggested to look for a configuration file, but
couldn't find any.
Any suggestions? I'm dying to get my hands dirty with the SDK.
Whenever I've seen that error, I've just retried the download several times and eventually it went through. I've only run into it when I was behind a proxy, but that might not be your problem.
Here you have a Android tutorial, step by step.
http://www.vogella.de/articles/Android/article.html
Its means that you are behind a proxy.Go tools->options in your android SDK manager and enter your http Proxy server and port and it'll work.