Eclipse with ADT - JUnit Test Not Running With EclEmma - android

I am currently running Eclipse Juno with the Android Development Tools plugin so I can develop Android applications and test them. To get code coverage of the applications (and preferably the APIs of Android themselves), I installed EclEmma into Eclipse, but just when I was about to run it for the first time, it gives me an error:
Error while dumping coverage data (code 5013).
Socket closed
I don't know what might be causing this, and when I looked it up here, the workaround didn't seem to work or I'm just not sure where those directories it mentioned are when dealing with the Android SDK. Anyone deal with similar problems?

Latest versions of EclEmma use Jacoco, which as far as I know doesn't support off-line instrumentation.
You should try to find a pre-Jacoco version of EclEmma (it was working just one year ago, http://dtmilano.blogspot.ca/2011/07/eclipse-android-and-emma-code-coverage.html) and try to install it on Juno (very unlikely to work) or stick to the HTML reports, wich can be opened in Eclipse, so it's no such a big problem.

Related

Unity 2019 gradle build failed

I noticed that a lot of people have had this issue but I haven't been able to find a solution to it yet.
The main other places I found with almost exactly the same error, and recently, is here
When I simply try to install unity 2019.1 and the web GL editor component as well as the Android build component via the offline installer from the beta page, and attempt to build a basic empty scene to Android, after installing NDK and the SDK manually offline as well and pointing unity to the installations, then everything goes fine until the very end, but then it says "Gradle build failed..."
And there are about 26 errors that I can't copy now because I'm on a different device, but the main one is
"Could not resolve com.android.tools.build:gradle:3.2.0,.
And then could not get resource HTTP (...gradle-3.2.0.pom, basically)
So that link I mentioned earlier involved almost the same issue, but it's still unresolved. Basically, the unity staff guy implied that it's not possible to completely install unity offline, you would at least need to connect to the internet once to allow unity to install gradle to the home/.Gradle/cache, OR you can do it on another computer that can have unity, then copy over the cache folder.
The problems are, first of all, that even for that other guy who DID install unity and build an Android project on another computer with internet, it still didn't work for other reasons, but I'm just wondering on my case (and any similar case) where I don't have another computer that can install unity online, and the only unity capable computer is offline only, and unity is supposed to able to be installed offline via the beta components at least anyway, so how can I get the Gradle components set up?
Does anyone know where I can find a download of 3.2.0 Gradle cache?
Or is there any other solution anyone knows of at all?
I don't want to have to export the project every time then rebuild it in Android studio

How to develop Android applications? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I used to be an Android developer for 2 years, but over 2 years ago. I believe that things changed - we have Android Studio, Gradle and probably more tools that I'm not aware of right now.
What is the current development stack for creating Android applications? What tools should we used right now?
I used to use eclipse with ant, but as far as I can see, a lot of people are using AS with Gradle, which is, for my first experience, extremely slow.
How to jump back into Android development after some time of not being up to date with development stack?
Eclipse vs Android Studio is a matter of choice. You can get used to it within hours, or you can continue with Eclipse. I am using both tools for different projects.
Android Studio seemed to be more stabile at some points.
Update on Android SDK and third party libraries are more easily handled with Android Studio.
Android Studio has not NDK support yet. You have to compile native codes outside of Android Studio. Edit:(Well, actually it has support but claimed to be deprecated, probably developers are working on a better solution)
Edit2:(It will be soon officially supported with C/C++ debugger)
With Android Studio you can use java7 syntax, but you have to stick with java6 syntax on Eclipse. Edit:(you can now force java8 with a plugin on A.S and I guess java7 is usable on eclipse too) Edit2:(java7 is a must now for both parties, but still java8 syntax can only be used in A.S with a help of plugin)
Google releases example codes compatible with Android Studio saying eclipse versions will be available soon.
Android Studio has better GUI designer.
Android Studio has better refactoring capabilities.
The most important change is SDK itself, actually. Just check if Android Studio is good enough for you and study on SDK.
It depends on your project. For non critical or hobby projects you should definitely start with AS and Gradle right away because this the the future of Android development. Although it is still in 'beta' and it can break some stuff after a new upgrade, it has many new features which make you more productive and happier in development.
If you have a critical project and you don't want to spend your time with checking and fixing things your are not supposed to fix, you should stick back to Eclipse, at least until AS is released.
Independently on whether you use AS or Eclipse, you should already start learning and using Gradle. It works perfectly for both options. If you hesitate you can even keep Ant and Gradle building your project in parallel. They work together and don't overlap.
I have been using Android Studio the last year and I can say that it is a very powerful tool, that I believe, in the next year, will overcome Eclipse.
When AS was still in version 4.+ Alpha, there were some issues (mostly with external libraries .jar) but since beta was released and up until now almost every bug was fixed.
Moreover, AS is better when it comes to indexing and suggestions. You will be surprised by its suggestion system, which helps you save a lot of time when coding.
I still use eclipse for other projects, but I believe for Android Development AS is the tool you should invest in, if not for now, definitely for the future.
We are using both, Android Studio and the good old Eclipse IDE. We noticed, that it basically depends on what you're doing. Android Studio is good enough for developing from now and it will replace Eclipse soon. However, it has some drawbacks where Eclipse is your choice. A small comparison was made by Google themselves: https://developer.android.com/sdk/installing/studio.html
Eclipse: Eclipse is very stable and works perfectly with ant driven builds. However, if you want to use gradle, there's some work to do to get the build process working with eclipse. We tried to use Eclipse with Gradle but the Gradle Plugin was quite buggy at this time. If you want to use native C code, you must use Eclipse, as Android Studio does not support that, yet.
Android Studio: Looks great and does also a very good job. The gradle integration works much better there. This is a big advantage over Eclipse when you have to deal with many dependencies. This is probably not an issue for small projects. But, if you're developing projects with additional libraries or frameworks you should definitely give Gradle a try. I hope, that the NDK support is coming soon, so that we can switch to AS completely. Ant builds are someway out-dated.
First of all, I will not debate about Android Studio vs Eclipse as it's an opinion based discussion and a kind of a troll...
The Android development basically the same : the base tools still ADB, Android SDK, Java language... So you can continue to use a "notepad" and compile, build and deploy by the SDK tools.
However, like in every development project, you could choose your upper level tools. Your question is about IDE and building system. This is only a matter of choice.
Android Studio and Gradle are still in beta phase for Android developments and you could use them only if you keep this in mind. You could continue to use Eclipse and Maven or switch to Android Studio and Gradle or keep using Eclipse but moving from Maven to Gradle... just make what you prefer.
The Android development stack evolved this way :
Basics tools : Text editor, SDK tools
First IDE : Eclipse with ADT plugin (can run your program from an IDE)
Industrialisation phase : Eclipse ADT + Maven (dependencies management, building process management...)
Coming phase : Android Studio (IntelliJ based) + Gradle (you can compare Gradle to Maven, but this is another discussion)
I think that other answers will give you personnal points of view about Eclipse vs Android Studio, Maven vs Gradle, etc... which is a really personnal choice ;)
My development stack for Android :
IntelliJ 14
Maven
Android SDK
plus my own OSS Framework to ease the pain of Android for a Java EE developer
Reasons:
IntelliJ is the best available IDE imo
Maven is pretty mature
The plugin has become useable
The workspace integration Maven -> IntelliJ is working great (both, using maven builds and deriving IDE builds from maven)
If Android Studio (which is in great parts IntelliJ) has become slow, it come due to the gradle stuff. I had a large scale project based on gradle and made these experiences :
Slow, Slower, gradle (up to 2GB memor consumption for building an app)
Xml is horrible, but gradle dsl is imo even worse
Switching to gradle 2.1 broke the predicate logic (e.g. formerly working project.hasProperty("foo") && property.ext.foo.equals("bar") does not work any more, this must not happen during a MINOR release
Compared with maven's xml hell, gradle leaves a callow, unmature impression on me, especially building with gradle is hell of a slow job compared with maven.
But - and this is my true oppionion - if gradle is pushed by google and gradleware, it definitely has the potential to become the next generation building tool, although I doubt that the flexibility in gradle will ever lead to a proper IDE workspace build derivation. From my point of view, the choice for gradle over maven done by google happened in a too early state.
just my two cents.
PS: Try tuning the memory settings. Give more memory to IDEA (e.g. 2GB in a 64bit enviroment). My experience with IntelliJ is, that the default mem settings are too small. You can find it in $InstallDir/bin/idea.exe.vmoptions resp. $InstallDir/bin/idea64.exe.vmoptions
EDIT: This is not intended to be gradle bashing. Gradle has large potentials indeed. This post reflects my experiences during my last project basing on gradle (non-Android). For beginners gradle might be the better choice since it is a lot easier than maven.

failed to build project in eclipse with android after add blackberry

I install a blackberry developer plugin in my eclipse indigo that already installed by android. But after i installed the blackberry, my eclipse get an error. The error message is The building workspace has encountered a problem
Errors occurred during the build.
Errors running builder 'Java Builder' on project 'AMDP3'.
net/rim/ejde/external/sourceMapper/SourceMapperAccess
I think it's because my eclipse is confused because it tried to build an android project in the "blackberry way".
My questions are:
Can 1 eclipse contain android and blackberry plugins (i have searched and some say yes while some say no...so i tried to do it)
According to my 1st question, what should i do now?
Thanks
Answer : According to the chosen answer, i recommend you to install 2 different eclipse, but if it's to late just uninstall your BB plugin : CLICK HELP->ABOUT->INSTALLED SOFTWARE->UNINSTALL
While theoretically you can, I'd recommend against it.
I've had a couple of bad experiences where installing BB plugin in eclipse uninstalled some metrics plugin I have already installed. Since then, I tend to use separate eclipses for each platform. Never had this problem with Android plugin. I also refrain to upgrade old BB plugins installs to the newer version, because of compatibility issues.
I usually download the eclipse+BB plugin package available in BlackBerry Developers page, because it comes with the setup almost done, so I can save some time.
If you are going to do it, try to install the problematic one (BB) first, then the Android one.
If your question is: Can I run a single instance of Eclipse for both Android and BlackBerry development?
The answer is: Yes.
Not sure about your error though. In case it helps here's my list of installed software for my working version of Eclipse.

Issue with installing ADT into eclipse -noob warning

I'm trying to get started on Android development for my self taught technology class. I followed numerous tutorials, but I always get stuck here:
I told eclipse to find and install ADT from this url:
https://dl-ssl.google.com/android/eclipse/
But upon install, it gives me this error:
Android Development Tools (16.0.1.v201112150204-238534) requires plug-in "org.eclipse.core.runtime (3.6.0)", or later version.
I have googled around but I cant seem to find what it really means or how to install or obtain what its asking. I'm completely newto this whole development field, i only have experience in VB.net and I really want to start developing android apps to build a portfolio for my class. Thank you so much, I really appreciate all your time
That error stats that your eclipse is older version. you need to download or update eclipse for installing Android ADT.

Is developing an android/phonegap app with Netbeans IDE a good method?

My objective is to have an IDE with JS syntax error reporting and a PhoneGap plugin.
My goal is to make an android application using PhoneGap.
I understand that Eclipse has a well supported PhoneGap plugin.
The issue is that I have spent hours trying to get Eclipse JS syntax error reporting to work with no luck.
Netbeans is extremely easy to install and has working JS syntax error reporting with no extra steps needed. For example, with NetBeans, I just install and everything (including JS syntax error reporting) works. With Eclipse, I must install, then install several addons related to JS. In the end, I could not get the JS syntax error reporting of Eclipse to work, despite hours of research. I am new to Eclipse.
Is developing an android/phonegap app with Netbeans IDE a good method?
I found this plugin, but don't know exactly how it works with PhoneGap or if it's any good: http://www.nbandroid.org/
The Phonegap plugin described here on the PhoneGap wiki includes the default Eclipse JSDT syntax checking. It also includes an option to turn on customizable JSLint checking - see Section 7 here. This all comes with a single plug-in to add the Android ADT.
If something's not working for you, it would be great if you raised the specific problem on StackOverflow, on the mailing list, or create an issue.
From 7.4 version Netbeans has Phonegap support without external modules.
Obviously you need also phonegap and android sdk :)
see http://wiki.netbeans.org/MobileBrowsers#PhoneGap_2

Categories

Resources