The questions you are asking are pretty basic. I'm guessing you're a total beginner? I think the best advice I can give is to take your time and go through the docs, for example: https://developer.android.com/guide/topics/ui/declaring-layout
or maybe look for an official Udacity course (this one?)
and also you can browse some of the sample apps on github. The welcome screen has an "Import Sample" option, or if you've already opened a project, you can use File -> New -> Import Sample
.
https://www.udacity.com/Google I've been working through the Android basics nano degree. The Android developer degree is for more experienced programmers if that's more your speed. If you look up each class individually you can take them for free, just don't get a certificate at the end
This doesn't make any sense.
You need a somewhat reasonable power on a computer to do builds and keep compilation time down to a minimum such that the length of builds don't impede productivity.
Also, software engineers generally don't write software on Android devices, they write software on computers. Android is a stripped down version of Linux; most of the tools needed by a developer (source control management, IDEs, powerful multi tasking, lots of CPU power, and lots of ram) are either not available on Android, or have been stripped down for the sake of running on an Android device.
Suggesting that its odd that Google doesn't have an Android Ide on Android itself is like suggesting that its odd that BMW doesn't build its engines by opening up the hood of a car, getting inside the cavity, and building the engine directly inside the car.
It doesn't make sense to do that when doing so is incredibly hard, and it's much easier to build the engine in a factory and then put it inside the car.
Android IDEs on an Android device DO exist, however it's more of a novelty/last resort thing than a primary means of developing apps.
Check out AIDE. But imagine spending 8 hours a day typing code onto a tablet (or a Bluetooth keyboard if you're Lucky) and then spending at least 5 minutes staring at the screen waiting for the app to compile every time you make a change. Android tablets and phones are just not the right tool for this job (at this point). With more powerful android devices like android powered laptops, or performing builds in the cloud, this might change
Google provides two free Udacity courses you may find worthwhile.
The basics (useful if you're also new to Java): https://www.udacity.com/course/android-basics-user-interface--ud834
App development: https://www.udacity.com/course/new-android-fundamentals--ud851
There is a bit more to it all then just "click this and then click that."
Udacity has a great Android Basics tutorial series that does a great job of explaining how things are done.
Here is part 1: https://www.udacity.com/course/android-basics-user-interface--ud834
Just one screen with some buttons? Should be easy. But I'd take the time to learn some other aspects of android dev. Check out Udacity courses. https://www.udacity.com/course/new-android-fundamentals--ud851
Just had to implement this for a course.
This article got me on the right track:
Think of your onCreate only being called once. It sets listeners up that allow things to happen, but onCreate doesn't run again, just the code inside the listener.
Just loaded your code and ran everything, buttons seems to work fine, but your "if check" is not running and that is where you are calling your methods to go forward(), backwards() and whatever.
Is there any reason you are not calling forward in the touchListener?
Here is a what I think maybe you should change your itemListener to.
Also, just for best practices your Java methods should start with a lowerCaseLikeThis(), I changed your forward, back, left, right, stop, disconnect methods. Only Java classes should begin with UpperCase.
Creating this app was my first time ever coding in Java. So kind of stoked about that. If you wanna check it out or to scream your problems away:
If you go with the new design guidelines and use jetpack/androidx libraries then Intents become much less important. And, imo, you should do that if you're learning android these days. This is a really good free course from google itself, that teaches you all of this.
The idea is to have your logic in fragments instead of activities and a single activity that only hosts those fragments. You then use 'room' to store and retrieve data instead of passing it around between the fragments.
My suggestion: start with an online course that walks you through the creation of a project. For example, Google posted courses on Udacity you should check out. Something like: https://www.udacity.com/course/android-basics-user-interface--ud834
Also, there are codelabs you can explore, for example: https://codelabs.developers.google.com/codelabs/android-training-welcome/index.html
Full disclosure - I haven't done either of these, but if I was in your shoes, I might give them a shot.
Does that help?
I personally found these free Udacity courses very helpful. Although they use Kotlin, not Java. The first one uses IntelliJ IDEA, not Android Studio, but the interfaces are almost identical. The second one uses Android Studio.
Read this guide: https://developer.android.com/guide/topics/ui/layout/recyclerview
Reading code on git repositories won't help much.
You can also take the free course on developing Android apps on Udacity, which is made in partnership with Google.
Link to that course: https://www.udacity.com/course/new-android-fundamentals--ud851
Pretty sure you're just using incorrect syntax. Either change the existing apply plugin
line to match the one above or do it as per the Firebase docs:
apply plugin: ‘com.android.application’
apply plugin: ‘com.google.gms.google-services’
> I need that the user can see the other users in the area(map)
Change the security rules so that data is readable by the world. The general idea is that the app upload the location of the user to a global list, using their id as key. The entire global list can be read from the db with other users' locations.
You can use an MDM solution like Hexnode MDM to lock down your tablet to a single app. You can disable any peripherals including hardware/software buttons, hide status, and system bars. You can also configure Auto-launch settings to run the app in the foreground as the default kiosk app and relaunch it automatically after a specified time interval.
Learn more on Android kiosk mode here - https://www.hexnode.com/blogs/what-is-android-kiosk-mode/
> CreateProcess error=5
According to this:
>error=5 means one of:
>1) file is not executable
>2) file is not accessible
So it looks like you haven't installed a git client, or need to tell Android Studio where it is.
I think you can use the IDE instead of actually adjusting the gradle files, I think - but it's very obvious that things like dependencies are meant to be adjusted in the gradle files.
Don't worry about basic stuff like compiling, but see it more as if you want to use an external library, using an (online) external dependency, etc. If your app is basic, you won't have to touch the gradle files. However, I'd recommend learning gradle a bit (see: http://www.gradle.org/docs/current/userguide/userguide_single.html). I find it simple to understand, you just need to get used to the syntax and such.
Thanks. This documentation seems to confirm that: https://kotlinlang.org/docs/tutorials/android-plugin.html
The document says that experimental mode needs to be enabled, but maybe the document is out of date.
If it's not a requirement to use the Virtual Emulator from AS, I highly recommend using genymotion instead. Faster, easier to use, it has a wide range of popular devices. It is really easy to integrate with Android Studio.
Do you have an Intel CPU?
Don't bother with Google's emulator, it is the suck. Use either Microsoft's Emulator (free) or Genymotion (free for personal use).
Thank you.
The Logcat is pointing to these lines
Line 182 wm.addView ( view, params ); Line 111 ShimejiView (); Line 95 pause ();
​
Also here is the full code snippet if want to take a better look.
I encountered this issue today. My solution was to stop NordVPN's CyberSec feature in their application's Settings dialog (in the General tab). This is supposed to stop ads and malicious sites, but it looks like the Google URL is a false-positive.
If this application or another is blocking Google's redirection website, you will be unable to download any of the Android Studio files from the official site.
If you have NordVPN, I therefore recommend unchecking the CyberSec option (this will require a reconnect) then the download should work. (I am going to leave it unchecked as I have a PiHole on my network which does a good job blocking ads and trackers already.)
If you aren't a NordVPN user, there will be some other application or browser extension blocking this URL. Try disabling your proxy/firewall or ad blocker temporarily and attempt the download again.
Sorry to hear this has been so frustrating. It's easy to get disheartened, especially when you hit a roadblock right at the beginning when you're eager to get stuck-in, but I hope this fix helps get you back on track :)
well now i am facing other problem. but its pretty much the same. the code dosent continue after the line: String message=br.readline()
i am doing a project that required server to send a file to android app
now the server menage to send a file in python to a python client
and in different test i manage to make a connection between the app and the server
but the code in android studio cant receive and then send the data as i said the code stops at "String message=be.readline();"
i fought about that and i realise that i dont need the code to do both things but the problem still remain, code stops after reading the Buffered Reader
I'll say I've only started learning java 5-ish weeks ago and just finished making this https://play.google.com/store/apps/details?id=com.nrobneppu.pokertrainer
​
I never even looked at Kotlin yet. There is a lot of typing but with the autocomplete thing I find it is not bad at all.
Hi Ruben, I am starting as well and read couple of advice. Almost all the "10 books you absolutely have to read about Java" mentioned "Head First Java", even if the 2nd edition is little bit old, still a classic and really funny to read. It would be nice to take this journey together, Ruben.