Robotium: Could not find XXX.apk - android

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.

Related

Android Studio: more info about "Error installing app"

When trying to run the app on the device, I'm facing the following issue:
I the Event Log, there is the same message:
Where can I find more info about the error?
Might work if you Clean the project or rebuild the project and if you launching in emulator uninstall from the emulator or from mobile.
UPDATE:
i think there will be no more information about the error...
It's our common mistakes.
As per my knowledge about this issue there can be a few reasons for that:
First is that your app is already installed with the same package
name but with different certificate, To resolve this check if your
phone has that app already installed then uninstall it and try to
install new one.
The second reason can be that you are trying to install the
application that has minimum SDK version higher than the Android
version of device. To solve this make sure that the minimum SDK
version defined in your project's "build.gradle" is lower than the
Android version of your device.
Turning off the Instant run removed error for Android Studio 2.3.
sometimes project location contained the special character.
Example: E:\Android_Projects\T&PUIET,KUK\app\build\outputs\apk\app-debug.apk
close android studio > rename folder containing the special character(here T&PUIET,KUK ) > restart android studio.
Hope it will help!

Exporting a build from Unity to Android fails

I'm new to coding and to Unity. I've followed the step-by-step found in this google page. I have installed all the SDKs and the latest versions of Unity and Android Studio for mac OS.
Everything goes according to plan and I get to the final "run and build". It connects fine to my Note 3 and runs almost to the end when I get the following errors:
Error message window
Assets/GoogleVR/Scripts/VRDevices/GvrDevice.cs(99,10): warning CS0618: `UnityEngine.GL.IssuePluginEvent(int)' is obsolete: `IssuePluginEvent(eventID) is deprecated. Use IssuePluginEvent(callback, eventID) instead.'
and
CommandInvokationFailure: Unable to convert classes into dex format. See the Console for details. /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java
-Xmx2048M -Dcom.android.sdkmanager.toolsdir="/Users/Bruno.Vilela/Library/Android/sdk/tools"
-Dfile.encoding=UTF8 -jar "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar"
-
I have tried all that I am able to and have found no way around this. I am simply not versed enough in C# to debug this on my own. Any help will be greatly appreciated!!
SPECS:
Macbook Pro running OS X 10.10.5
Unity 5.3.4f1 Personal
Android Studio 2.1.1
Galaxy Note 3 running Android 5.0
Cheers!!
-BV
This might be caused due to having duplication jar files in your project. check if that is true, try removing any duplication and building the project again.
some similar reference : http://answers.unity3d.com/questions/765961/multiple-plugin-conflict.html

Android studio 1.5+ error type 3 - Activity class does not exist

I recently upgraded to Android Studio 1.5 and now every project that I try to Run or debug shows, Activity class does not exist. Solutions that I tried and failed are listed below.
Clean build
Rename Activity class
Restart IDE
Upgrade to Android Studio 2.0 Preview
Install new build tools
I had the same problem.
I realized i've moved all dependencies to my library project. My project compiles with no warnings, but always gives me "segmentation fault" when try to run it.
I duplicated library dependencies to the apk project, and now it starts.
Don't mix dependencies 22.x and 23.x
I hope that this trick works for you too!
Try disable the ADB integration ( Tools- > Android- > Enable Integration) That worked for me. That's the key!
Strange problem , stranger solution. I tried the app on lollipop and now it works fine. I had been installing on Marshmallow (Android 6.0) both on emulator and my device. Though this is not a solution, we can close the question for now.
I also had the same issue when using my own phone (API 18) instead of emulator. Then, after uninstall the previous version of my App, run and install it again, everything worked well... So, I suggest this approach, its worth trying.

Failed to detect New Relic instrumentation. error in android application

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.

Stella SDK convert to android

I'm trying to use the stella SDK to convert my iOS app made in cocos2d 1.1 rc0 to an android project. When I use the method on here: http://www.yeecco.com/support/docs/getting_started#portingiosprojectswithstellasdk
I get the error: Lexical or pre-processor Issue: 'GL/gl.h' file not found
This occurs even when I follow part one of the tutorial in which you convert the GLSprite test project to an android project. I have no idea how to solve this issue, especially as the issue is occurring in the same file that it says isn't included!...
Here's a screenshot
The problem has been tearing me. And I finally found the SDKROOT should be OS X 10.7 .
Set TARGETS-> Build-> Settings-> SDKROOT-> OS X 10.7.
And then install X11 http://xquartz.macosforge.org/landing/
after installing, you log out of account from mac, log in again and run this project.
That's all!
I found a fix.
On the Xcode project generated by StellaSDK, set the Base SDK for the target to OS X 10.7. Then add this to the “Header Search Paths” field in your target's build settings:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/X11/include
You will also need to install XQuartz following Apple instructions for it to work.
Cheers!

Categories

Resources