Error while making Android Application Project in Eclipse Mars - android

Im new to programming and am trying to make a game for Android. When I try to make a new Android Application Project, it lets me fill in the form and everything but when Eclipse is creating the project, I get this error: https://gyazo.com/1b875ce753ccf2aab85359b567abdba5

you need to import appcompat-v7 or check this video
updated - another option - not use templates when create new project: means doesn't create activity, and ect via constructor. in this case you need to create it manualy. guess it simpliest that switch off appcompat.
btw. is better to use Android Studio, as for ex. latest adt not supported by eclipce

Related

Why can't I specify where I want my Kotlin file to be destinated in Android Studio?

my problem is the following:
I'm using Android Studio 3.0.1 and I'm trying to be as fast as possible on creating new files (using MVP can be a challenge in Kotlin).
For example, when in Java you find this:
Then if you click (according to your computer) on Option + Enter, I have the option to create my interface:
I can choose the package and the folder where it will be placed:
But when I'm with Kotlin:
It just offers me to choose the class container (and I want to import it, setting up externally)
Is there any reason why Android Studio is not equipped with this?
You do need a second step currently, but it's very simple: create it in MyListActivity.kt and then Option+Enter on the created interface will give you option to move it to a separate file. And look on https://youtrack.jetbrains.com/ if there is an issue for this yet.

Can i create an android application as template?

I'm not sure if its the right title but ill explain what i mean.
I'm making more than one android application, but they have the same structure
sliding menu , list view , about me , costume dialog with (copy,share,like)
with some modifications in the styles (colors, backgrounds , fonts , menu strings )
my qustion is : is there any way to use the structure as library or implemntation or anu other way
insted of coping the same codes in every projects ?
Basically what you want to do is to create an Android library. Just develop it like a normal application, with Activities and layout.
Please follow this tutorial to set up your project. http://www.vogella.com/tutorials/AndroidLibraryProjects/article.html
When you'll create a new project with the given library, all your code will be silently included and you'll get access to your Activities and even to your R class.
Try Android studio - Official IDE for android development. Simple to use.
There is an option to save your project as template. Tools > Save project as template
For eclipse I think you need to write plugin https://stackoverflow.com/a/4992150/3020568

How to make a phonegap project as library in android?

I have already created an phonegap android project and it is working fine, now i would like to create same kind of project againg. Might it would be more than 5 apps, so i thought making it as library.
I have make the project as library and created a new project with different package name. Change the launcher activities name to the libraries launcher activity name. But now the issue is application error is happening, cannot load the index.html file.
So i think the way worked on is not the proper one, can anyone please help me to solve this problem.
you have to assign your initial android project as a library. right click the project, pick properties, then go to android, tick the "is library" box and apply
For your new projects, you need to "add" the project before as your library as the image above

How to launch an Android project from an Eclipse plugin programmatically?

OK, I've started doing some Eclipse plugin development.
I've got my own custom icon in the toolbar.
When clicking the icon, I'd like to show the following screen to the user:
I have an IProject object of the Android project I'd like to launch.
Unfortunately, there's no simple IProject.launch() method...
What I've done so far is cloning the ADT source from here
git clone https://android.googlesource.com/platform/sdk
and started copying over all the necessary parts.
There must be an easier solution than this?
Can't I just hand over the launch of the project to Eclipse / ADT Plugin?
If you only need to change some of the Java code directly before the user launches the project, you can go an easier route: Just implement an additional project nature and an additional project builder. Then add the nature and the builder to your specific projects. Make sure your new builder is before the other builders in the project builder order, like in the below screenshot
Everything else works like before. That way your plugin is like every other large plugin. E.g. the Android tools also do some magic first and then the normal Java builder is invoked, instead of re-implementing the Java stuff.

In Eclipse, Is it possible to use support library when using the Android New Activity wizard

When using the the new activity wizard for an Android app in Eclipse
File -> New -> Other -> Android -> Android Activity
I get the warning
This template requires a minimum SDK version of at least 11, and the
current min version is 8
This happens for most of the options in the wizard but right now I want to create a new master detail activity which will make use of fragments.
I am using actionbar sherlock and I have the latest support library jar registered with the project. I would like to use the wizard as fragments are new to me and it seems like a lot of code is needed that I am unfamiliar with. So I'm using the wizards as both a learning process to understand how fragments should be implemented properly and fault free, which is something I'm not confident of doing manually just yet.
It seems to me totally obvious that I should be able to tell the wizard to make use of the support library methods and classes but I can't seem to figure out how to do this.
I could just change my min sdk level to 11, use the wizard, change the min sdk level back to 8 and make the support library changes that are needed but what a pain!
Update
How would I go about changing the source code of either Eclipse or the android sdk to achieve this as both are open source right? Where should I start looking?
Any ideas greatly appreciated
Unfortunately, the answer is no.
The New Android Application wizard does not allow you to select / add third party support libraries to your project while creating a new project. The only library it will add by default is the android-support-v4.jar library.
It is a small trade-off I suppose. The new wizard, especially the Android Activity, does simplify things when creating new Activities quickly. But I suppose, it is something we will have to live with until Google adds such a provision. That is, if they choose to add it sometime down the line.
Update 1
Eclipse is Open Source. These are all the sources available for the Eclipse Source: http://git.eclipse.org/c/. However, I don't think modifying Eclipse would be helpful. I am almost certain, it is more ADT's / SDK's doing than Eclipse per-se. But I am merely speculating on this one.
Update 2
You can download the SDK source from here: https://android.googlesource.com/platform/sdk/. Good luck. :-)

Categories

Resources