Skip to content
Advertisement

Tag: android-studio

Need help outputting “You must enter a name” when nameText is null. With the code I currently have it doesn’t recognize when the nameText is empty

MainActivity Need help setting the text to “You must enter a name” when the nameText is null. For some reason even when the nameText field is empty it still outputs “Hello” when it should be outputting “You must enter a name”. Answer Probably you need to check if the text of your EditText is null, not the EditText widget itself.

R.layout.activity_noconnection error in android studio

I recently changed my package name using this method. but now when im trying to create a new activity its giving me an error on R.layout.activity_noconnection (on R). then i pressed alt+enter to fix the error it imported “import OldPackageName.R” and that fixed the issue, so that means my old package name is still there in in the program .

Why is my app Crashing with RecyclerView?

I’m doing a recycler method in my android studio project but i have a problem. Everytime i’m trying to findViewById my application is crashing. And i don’t understand why because i’m creating my view in the good way. And i’m trying to continue with that But i’m crashing at the line recyView = view.findViewById(R.id.recyclerBuy);. My R.id.recyclerBuy is not empty. And

near “”: syntax error in SQL with android studio

I’m working on a SQL databse on java (android studio project) but i have a weird mistake. Basically, everytime i have I have tried like this My DBS is And i really don’t see where is the mistake. Because they’re saying “syntax error”, but for me, it’s look pretty OKAY. Anyone have a clue ? I’m just trying to insert

Why cant I initialize the Webview

im just starting out with android studio, i have imported WebKit but those imports are grayed. and i cant initialize the webview “private WebView webview” shows errors how to do it correctly? Answer I was using kotlin instead of java that was the issue (beginner mistake lol) my issue was that i couldn’t initialize the webview on my code. but

Advertisement