how to make application with android - android

I am trying to create a new android apps but it says me like this
[2011-08-18 15:27:39 - jeetu] Conversion to Dalvik format failed:
Unable to execute dex: wrapper was not properly loaded first
What does it mean?

Notepad
Thats pretty good place to start

You can read developers guide. It is really good. - http://developer.android.com/guide/index.html
I love reading Pragmatic Hello Android also..
link - http://pragprog.com/book/eband3/hello-android

I'd say leave NotePad example aside and start with Eclipse and ADT. Its worth it.

A good tutorial to start :
http://developer.android.com/resources/tutorials/hello-world.html
For your error, Go to Project -> Clean, it will rebuilt workspace and fix the error

Related

Android libGDX: Eclipse crash when using google-play-services_lib

I'm learning how to make games in libGDX, and I'm trying to add ads to my game.
I'm following this tutorial:
https://www.youtube.com/watch?v=cwAN4LMXo58
(I'm using Eclipse instead of Android Studio).
I got stuck at 9:35 of the tutorial; I've copied all the code and everything seems to look good; but when I try to run the code, nothing starts; Eclipse just keeps loading until the following error pops up:
Unable to execute dex: GC overhead limit exceeded
GC overhead limit exceeded
It seems to be the same problem as this guy had:
Importing "google-play-services_lib" into Eclipse crashes libgdx project
But I followed all the suggested steps and Eclipse still crashes... (I seem to have too little reputation to comment on that post).
Eclipse didn't crash before, when I didn't select google-play-services_lib in Properties - Android (after right-clicking the android project), but had it selected in Properties - Java Build Path ; but then there was a different problem (which I've partly forgotten), I believe the class AdView couldn't be found or something (sorry for not being to able to be specific).
I'm using Eclipse Luna. I've tried to make a new project just to try everything a second time; same problem.
Please tell me if it would help to post other information! :)
This issue is related to your VM options which you can change in your Eclipse.ini file. I don't know your default values but if you increase -Xms and Xmx limits, your problem will be fixed.
...
-Xms1024m
-Xmx1024m
...

Eclipse: what is the difference between android-support-v7-appcompat and appcompat_v7?

First off I'm soooooo frustrated trying to get android.appcompat....gridlayout to work. I've followed lots of tutorials and just keep getting that horrible "android.support.v7.widget.GridLayout failed to instantiate" message. So I'm doing some serious detective work to try and understand everything about the compat libraries.
So like the title asks, what is the difference? I'm building the libs/android-...jar files, adding them to the path, following all the directions on https://developer.android.com/tools/support-library/setup.html
Any insight? Should I just uninstall eclipse and start from scratch to try and do this? I'm working with a test project and nothing is working. I keep getting 1 instantiation errors along with an error saying "a resource already exists on disk 'C:......\android-supp..-gridlayout.settings' and '....prefs'.
Please please any insight. Have spent a long time on this. Any advice is much appreciated.
they both refer to the same "v7 appcompat library" discussed at the android developer site.
You cannot just copy the jar file, as this library has resources that are referred to by your project so it needs to be added as a library project with resources as discussed here.

Libraries in SDK 17 - android

I have a question to which I have not found an answer, sorry if repeated
I upgraded to sdk and ADT 17 and since then every time I open a project leading, for example, advertising admob google gives me error:
Could not find class 'com.google.ads.AdView' ...
This strikes me in all projects that include libraries (jars)
I have read about in this SDK has changed something about it, but my English is not very good (use google translator) and I understand that I am doing wrong.
I appreciate any help.
Best regards
Quoting Xav:
If you have ClassDefNotFoundError after updating to r17, make sure to read the following links:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17 shows how to fix the problem with nice pictures of what the project should look like.
http://tools.android.com/recent/dealingwithdependenciesinandroidprojects
(this was linked from the blog post and from the release notes) explains in detail how the new dependency system works.
Well, after hours of research , I found a simple solution.
Click on your Android Project
Select Properties
Select Java Build
Path Select Order and Export
Check all your references
Thats all !

Android app with library can't find the library.apk

I'm trying to get the FinchVideo example from the Programming Android book to work. It uses the FinchWelcome library. I've set up FinchWelcome as a Library and in the FinchVideo application I have checked the FinchWelcome library in Properties -> Android. When I try to run FinchVideo in the emulator it complains that it cannot find FinchWelcome.apk (output below). I'm building for Android 4.0.3.
While Googling for this problem I've found that a lot of people have this problem with Android apps that use libraries. No one seems to have found a solution that works consistently, though. None of the Android books I've seen even talk about how to download libraries.
What is the proper way to handle libraries in Android applications? Is this a bug in the Eclipse ADT?
Thanks.
[FinchVideo] Installing FinchVideo.apk...
[FinchVideo] Success!
[FinchWelcome] Could not find FinchWelcome.apk!
[FinchVideo] Starting activity com.oreilly.demo.pa.finchvideo.FinchVideoActivity on device emulator-5554
Not sure if you have struggled on the same corner yet for me the solution is to add the library in the Android Properties of you project rather than as project in the Java Properties ...
I am also getting this error ( lets better call it confusing/weird message ) every now and then - my Workaround: just ignore it for now and wait for a new ADT version
And yes - imho this is a bug in ADT - Android is really nice, but ADT needs a lot of more attention for sure ..-)
I got the FitchVideo app. installed on the emulator. When I run it it crashes immediately with
D/AndroidRuntime(505): Shutting down VM
W/dalvikvm(505): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
E/AndroidRuntime(505): FATAL EXCEPTION: main
Nothing in the rest of the stack trace refers to the Fitch source (app. or lib.).
I can't tell if that is a problem with the way that ADT installed the app. and lib on the emulator or if it is some other problem.
I don't think I'm going to spend much more time with the code from the Programming Android book.
I solved the problem.
In your FinchVideo project you will need to add the reference to FinchWelcome as a jar-file library reference rather that a project library reference.
Hope this helps.

Steps to implement ANT through eclipse for creating Android Build

I checked out many blogs for creating an ANT build script for an android project.
Many suggested creating it using the command line and quite few explained about creating it using eclipse, but the solutions don't work for me properly.
Can anyone please help me by specifying proper steps to implement ANT through eclipse for creating an Android Build script.
There's no Eclipse way of doing this, you have to use android update project/android create project.
If you elaborate which parts of the command line process failed for you we could probably help you with that.
I used this doc for doing just that. Always did it from command line. Specifically what you need is the "Update a Project" section in here: http://developer.android.com/guide/developing/projects/projects-cmdline.html
The link that #Eli Konki shared was very confusing to me. However I found this article that was pretty straight forward to follow. The only thing that didn't work for me was that I needed to add
<property file="build.properties" />
To my build.xml so that the properties I configured were acknowledged. Hopefully it will prove to be useful for you too.

Categories

Resources