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.
Related
I am very new to Robotium tool. I am facing issue for the execution of first test in Robotium. Please help
Step1:
I created Android virtual device in using eclipse and ADT.
Details: Android 5.1.1 - API level 22
CPU - ARM
Virtual device created and launched successfully.
Step2:
Then Installed application apk using command line
details: adb install path-of-apk\XXX.apk
Step3
Created Android Test project. Imported Robotium SOLO jar as external library.
Android.jar is under Android 5.1.1
Robotium jar is under Referenced libraries
Step4
Changed Target package to correct one captured from Hierarchical view
Step5
Created test class and tried to execute it using Android JUNIT
Error i am getting is
[2015-12-12 01:22:50 - Robotium_Calc] Android Launch!
[2015-12-12 01:22:50 - Robotium_Calc] adb is running normally.
[2015-12-12 01:22:50 - Robotium_Calc] Could not find XXX.apk!
Update: I am using Windows OS and Java 1.7
Sorry. May be this question has been asked several times here but i could not find solution which solve my problem.
Please help.
Thanks in advance.
Probably your .APK has not been generated inside /gen/bin/ folder, check first if your project doesn´t have any errors.
I you don´t have any errors just make a Refresh -> Build
it seems to be a problem with your Android configuration in Eclipse IDE. Try to solve by using solutions from:
Android Eclipse - Could not find *.apk
I'm not already using Robotium, but please check also a configuration for your Robotium library. Read (if you haven't done yet) this great tutorial:
http://www.vogella.com/tutorials/Robotium/article.html
EDIT: if you still not have a problem fixed read these:
https://groups.google.com/forum/#!msg/phonegap/ok44ta96GZc/YrNH3BKKVjgJ
http://mobilemancer.com/2010/12/01/could-not-find-yourapp-apk/
http://azeemhassan.com/find-helloworld-apk/
Well, according to this site I can say that is a quite often problem with Eclipse bad configuration
Thanks for your responses.
However i think i was facing the issue because there was incompatibility between eclipse, JDK and Android version i was using.
Initial config : Eclipse Indigo, JDK1.7 and Android 5.1.1 - API level 22
I changed configuration to: Eclipse Luna, JDK 1.7 and Android 5.1.1 - API level 22
So updating Eclipse to Luna solved my issue.
I have been coding for a few years now and decided it was time to sink my teeth into android development. So I downloaded the latest version of Android Studio and installed all the relevant components with the installer.
However when i try to create a new project, using the blank activity, without even changing a single line of code, or editing the project in any way, the compile fails with the below error:
android execution failed for task :app:packageDebug
> Implementing Class
I have no idea of to fix this, any help would be greatly appreciated.
Thanks
I have been having the same error message. This is what I have found out:
I have a Mac Book Air with a Custom OS Image installed (from work) and on this computer I see the same error message above even from a fresh install (custom image) and fresh install of JavaRE and JDK as per the Android Studio System Requirements. Also a fresh install of Android Studio using a Blank activity with no additional lines of code.
However, I reinstalled OS X 10.10 from scratch, straight from the App store, with no OS customizations, installed the same JavaRE, JDK and Android Studio and the Error message did not appear.
I have been scratching my head over this error for a while now and this is the only solution that I have found. I'll keep digging and report back if I find a better solution.
I have downloaded latest adt bundle for mac from android developers website. I do create a library project connected to main project and suddenly, Eclipse started to nag! I checked the build progress and I figured out that build process restarts at 40-50%.
I have captured a screenshot:
Some people suggested to disable Build Automatically. After doing this, the project builds and runs OK but I have to build manually after every little change and it's boring.
I am using Eclipse IDE for android Developers version 23.0.2.1259578.
Android SDK Manager details:
What is the cause of this misbehavior? What is a good solution? Any idea?
This was my solution for this issue I have posted a few month ago,
https://stackoverflow.com/a/24631434/2970351
Also try other solution in that page if it didn't work for you.
I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error and when checking the logcat it is always because there is no classes.dex in my debug apk.
If I run gradlew.bat clean assembleDebug, there is no difference in the apk size so I'm assuming there is a build error in android studio. I am using android studio beta 0.86 and have tried it on 0.89 with the same result. I have tried build tools for 19.1 to 21 with no result. I have also tried different devices and created a new project (that has never been installed on my devices) and android studio seems to think it needs to be uninstalled first when attempting to deploy.
I have tried switching my device to ART, uninstalling and reinstalling android studio, redownloading the sdk and restarting my computer. NOTHING and I mean NOTHING has worked. I think the problem started after I downloaded the lollipop apis but am not sure. I have tried uninstalling all apps with my package signature on my device but NOTHING works! Not even Project -> Clean Project -> Rebuild
This is extremely frustrating as I cannot debug my apps anymore :/ has anyone had any experience with this error or ways to rectify it?
So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.
UPDATE:
I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.
We are using android 2.2 (really old i know) and couldn't find a fix for this error. Eventually we found this bug https://android-review.googlesource.com/#/c/30900/. The only solution for us was to remove some libraries...
I kept having the same problem - manually building worked fine, but Android Studio would not build a proper APK.
The problem was that I started the project on Android Studio and Android Gradle plugin version 2.0-beta2. After updating the Gradle plugin to 2.0-beta6 through a simple build.gradle change, the builds stopped working.
Turns out that, although I installed a beta version of Android Studio, the update checker only checked the stable channel. After setting the updater to check the canary channel as well, I was able to upgrade Android Studio to version 2.0-beta6 and builds continued to work normally.
You can change the update preference in Android Studio settings under Appearance and Behavior -> System Settings -> Updates.
I encountered this error when storage of the device is full. Try to open some space.
Try run these commands
adb reconnect
adb reconnect device
Every time I try to export an APK from Eclipse (tried Juno and Indigo) on Mac, eclipse crashes after a few seconds
This used to work fine on my current setup.
Running the app straight (debug mode) on my phone works fine.
The error from the console is:
Invalid memory access of location 0x10073f113 rip=0x101f656f7
Bus error: 10
I'm using Mac OS X 10.7.4 on a ~2010 MacBook Pro, with the following java:
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03-424-11M3720)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03-424, mixed mode)
I'm using ADT 20.
I've tried reinstalling Eclipse and the Android SDK, and re-downloading ADT.
The Eclipse error view doesn't show anything
Any ideas of different methods I can try, or other ways to investigate what's going wrong?
Cheers
Update: For anyone coming along post-2014, you should be using Android Studio, which doesn't have this problem.
Disable Project/Build Automatically when you are exporting
I think is a problem of Eclipse unable to detect the Android command is still working or something similar.
Of course there is ever the option of APK generation using Ant outside Eclipse you can generate an Ant build.xml from your Eclipse project more info in official Android docs
Disable Project->Build Automatically. I've noted that this works for me.
Disable project/build Automatically before export the apk.
This seem to be problem with your JVM. Can you update your java and check again. Also check this link
project/ clean worked for me. I think it could be related to the building of the project, as other users have posted.
The problem has gone until I have update ADT and Eclipse. I don't know which one solve the issue.
Now it's working smoothly for severeal signed export, with:
ADT Version: 22.2.1.v201309180102-833290
Eclipse Juno Service Release 2 Build id: 20130225-0426
Gentoo Linux running Java 1.7.0_45-b18.
UPDATE: Few exports after, I still get crashes from time to time, but no very frequently.
may be you should try to add execute authority . you can try something like this
first close auto-build
cd /home/your name/android-dev/sdk/tools/
sudo chmod +x zipalign
done and good luck to you
I used the disable Build Automatically for months now, until I realized that AWS plugins were slowing down the entire launch process. I uninstalled all AWS plugins from Help->InstallationDetails and everything now works perfectly as before. I do not need to disable Build Automatically any more.