When I hit "New Project" in Android Studio, I get a menu that asks me what type of project I want to make. The options are Java, Maven, Gradle, Groovy, Griffon, Static Web, Empty Project. I want to create a new project with an activity in order to start building an android app but the two options that seem remotely valid here are "Java" and "Empty Project". Choosng either of these does not create an activity for me. I tried to create an activity once the project was created by right clicking on the src file ->New->??? but I do not have an option here to create one. I am new to Android Studio could someone please help me as to why I cannot do this?
I looked at some video tutorials online and they all seemed to start with the correct menu, so online resources were of no help really...
I had this probelm either.
At last, I found that I hadn't activated the Android Support plugin.
Hope this will be helpful.
If I am right I believe you just select empty project to start a new android project. Androids website has an excellent tutorial to get beginners started: http://developer.android.com/training/basics/firstapp/index.html
I used this tutorial and it worked for me:
http://www.raywenderlich.com/78574/android-tutorial-for-beginners-part-1
Basicly you just click file\new project and you should be able to configure it and at the end you select "blank activity", which adds the activity in question. While I never saw a menu like the one you describe, it could be possible you just didn't download the important files with the sdk manager? You need the basic files and an api of your choice. It is also explained in the tutorial.
Related
This is a weird question, but sometimes when my code throws exceptions Android Studios lets me click on the class name located in the LogCat and takes me specifically to that internal class where it generated the error.
I'm wondering if there is a way to view the source code for this manually, classes like StaticLayout, Button, Cursor etc without downloading some type of converter.
From your question, it seems like you want to see the source of the Android classes like Button, StaticLayout and Cursor etc from your LogCat. You can download the Android source from the IDE by going to sdk manager from toolbar menus and downloading the Sources for Android SDK for your API level. Then when you click from these links, you'll be able to see the code behind.
Helpful link and source: Android Studio: how to attach Android SDK sources?.
you canĀ“t see the code because you don't have it. To see the code you must to have the .java file. Only have the .class file. To search an especific component you can search here grepcode Good Luck!
I'm working on a project and I want to implement qr-code scanner in it.
I tried to look for an in-app solution but i didn't find anything relevant so i decided to use a common bar-code scanner to launch an url.
When the user tries to open this link, I want Android to show him a chooser dialog where he can choose to open that link using my application.
I saw a lot of answer to a question like this, but i didn't find anyting about implementing this thing in a no-native android application.
The application is made in html5+javascript+php and all the answers i found spoke abount intent and so on...there is a way to implement the same feature using html5?
Thank you,
Christian
here is the perfect link -
http://devgirl.org/2013/09/17/how-to-write-a-phonegap-3-0-plugin-for-android/
Even I am new to cordova and found many difficulties while designing my 1st plugin.
and be careful cordova 3.0 and later version of cordova has huge difference with the earlier version.
best
I am following this link
https://developers.google.com/games/services/android/init
With trying to add leaderboards to an android app but after I follow step 1 and it is added it throws up over 100 errors and a Jar mismatch! Fix your dependencieserror, that I understand why.
I have added the google play library no problem and gotten adverts to work by following Google's documentation but the leaderboard documentation seems to be sending me all over the place and not helping at all.
Could someone please shed some light on this, thanks!
Ok because I am still new to Android and Eclipse I had added the reference to the BaseGameUtils in the properties for the project but you have to add the Google play services as a reference for the BaseGameUtils by right clicking and selecting properties then add it as you did for the main project.
I have few questions:
Is it possible to create an Android App with Java and setup all
myself?
If yes, what are the important things, that must a App have?
Is there a tutorial?
If someone want know why:
I want to understand all exactly and want to have the full control.
The Android SDK with eclipse have so many features(For the first small projects too many).
In the best case I want only link the Android library jar, but I think its not so easy and there are a few Mord things Like the App manifest ...
I hope someone understand me and can help me.
I want to understand all exactly
I doubt that there is anyone on the planet that understands it all exactly.
Is it possible to create an Android App with Java and setup all myself?
I do not know what "with Java" means here. Based on the rest of your question, I am interpreting this as:
Is it possible to create an Android application project without an IDE?
In that case, you are welcome to:
Create a project using android create project, designed to be built with Apache Ant, or
Create a project by copying an existing project or downloading a bootstrap project, then use android update project to create the Ant build files
If yes, what are the important things, that must a App have?
The android create project command will create a complete "Hello, world" application, ready to be run.
Is there a tutorial?
I will settle for pointing you to the documentation for creating and building projects on the command line, in hopes that perhaps that is what you are referring to.
I'am new here > i want some help to build some code but i can't find any code ..>
i have some project i must done it > so i hear about this website which is giving us helps by professional developer and programmer .My Question :how i can show my layout(xml file) when i open any android app ?? >> i mean how i can call my activity when i open any android application or replace activities between my app and any apps in android device.... so when i open any android application in my device the result will be show my layout(xml file) ... so how i can do it ??
i wish that anyone answer me ....
and i will be thankful
I'am called : (amjad)
Actually assuming you have 1 activity name as MainActivity in src folder of eclipse
and xml file name as main in res->layout
then you have to add following code in your activity
setContentView(R.layout.main);
By this you can use contain in xml file
dude check this guy :) he has a beginners tutorial series with index, so you can check any certain topic ,or follow one after another to save you time in learning best of luck ;)
http://www.vogella.com/articles/Android/article.html
Please refer to below link (basic tutorial for Android from Android/Google team):
http://developer.android.com/training/basics/firstapp/building-ui.html
Update:
I see that you have edited the question with more details. But, I am not sure if there is a way to call your app automatically when some one starts another App in the device unless it's a system level app. What you can do is provide one public intent to be called by any other apps and then at load time, the app calls your intent and hence can display your layout/xml.