I use android studio with Java language. My problem is that, always when creating a new project, I get an error in build.gradle (: app)
I get "Expecting an element". This problem does not affect my application, it executes everything without problem, it only hinders me when you want to use Google Firebase. Thank you for reading!
enter image description here
Try this:
api "com.google.android.material:material:1.3.0"
Related
My goal is setting the URL for the profile picture of an existing user.
I'm using the Google Identity Toolkit Java library on App Engine.
Below is my code:
GitkitUser u = gitkitClient.getUserByLocalId(localId);
u.setPhotoUrl(profilePictureURL);
gitkitClient.updateUser(u);
where gitkitClient' is my GitKit client, already initialized with the right parameters, andlocalId' is the id of the user I'd like to update.
This code causes the following exception:
org.json.JSONException: JSONObject["localId"] not found.
Documentation is hard to find for this library. I'd be glad if someone could suggest me what I'm missing there.
Thanks for reporting the bug. It will be fixed in one or two days.
[UPDATE] It's fixed. I manually tested and verified. Please also use the newest version of java library. You can get it from here or from maven update.
When I do any changes in xml layout file, it doesn't reflect with new compilation build although R.java is generated but when I run the application changes doesn't reflect. I need to rebuild the whole project which is taking time. Any help on this?
I guess before it was working fine.
Yes Sometimes it also happens to me. If you are doing changes i right way in the Xml file then those must be appear when you run your app. But if it does not happen, then you need to rebult your application, or clean it several time. if it also does not work to you then do the follwoing :
Close and re-open (Restart) the android studio and try running app again.
If step 1 is also not helpful then Uninstall app from your device , Disconnect and connect device again and rebuilt/Run app directly in your device again.
I hope this will work for you.
Pleas check if you have enabled Power save mode (File -> Power Save Mode) which turn off auto compilation
Android Studio - Auto complete and other features not working
I "touch" AndroidManifest.xml and that forces a build. Does not take nearly as long as rebuilding project or restarting emulator. It's a hack, but hey, it's my hack.
This sounds similar to my situation. I had an extra quote character in my colors.xml file, which caused errors when I tried to run my app. What worked for me was to remove the extra quote in my colors.xml file. Then I saved the file. Then I restarted Android Studio.
You can simply switch to project view and remove the build of the app:
After a few days of fighting this issue, I solved it by deleting all "v26" directories inside the "res" directory, since the activity was using it instead of the usual "layout" directory for accessing the xml.
app/src/main/res/layout-v26/
had to be deleted and you should remain only with
app/src/main/res/layout/
Anyway, I am new to android development and am not sure if this can lead to other issues, so be careful.
Do I need to save before running the android emulator on eclipse.
I get the error MainActivity.java has been modified. Save changes?
Can I not save?
Thanks
If you were to run without saving, your new code would not be compiled and the emulator would not run the code you had just typed. If you are not sure about a change or want to keep older versions, just use the Save As command and keep multiple versions.
The answer to your question is Yes, as ADT would check up the changes in the code, else the previous non updated code would be executed. There will be also a case where you have rectified a problem in your project and you will be still be facing it in the execution if the project is not saved.
You're answer can be found here
The answer, is yes. Yes, you have to save it.
I've been working on this project for months, and when I started out I knew nothing about android dev, gradle or signatures. Since Android studio was also quite new when I started in June, and updates often brought errors in the gradle, the code is a bit messy.
Now, I've been trying to get the new support library imported into my project - without success. Re-importing the project seems to fix this nice and easy, but this means I have to replace the old project(package anomaly). My question is, since this app is already deployed, will I loose the old signature and with it the possibility to update the app on Google Play store?
Hope to hear from ye! Thanks.
[EDIT]
Yep, worked like a charm :) Thank you Samuel!
If I am answering the question I think you are asking, can you change the package name and still upload the application as "updates" to one that is already in the market the answer is no.
Once an application is uploaded to the market, pretty much everything can change except the key and the package.
As long as you still use the same signature and key then you should be able to compile with different things and still upgrade successfully. I highly suggest compiling what you have now and trying to upgrade it in the app market and that will very quickly determine whether or not it is possible. If you do this post back on this post if it worked or not for everyone else to see
Good day everyone!
I am a graduating student doing Google App Engine-Java Web Application.
My problem is I need to compile/build it so it will run upon click. I've been trying exporting it to a jar file however it outputs no main class.... problem.
I've been looking for other method but internet fails me or maybe i'm not pointing on the right track.
Here's my output whenever I'm using the command line:
its working fine when i'm using eclipse.
Any leads? Sorry if my question is quite silly.
Thanks in advance :))
Firstly you should definitely consider updating your GAE SDK as it seems the defaultZoneTL field was removed from JDK 1.6 U31. Updating the GAE SDK should avoid that problem.
If you can't do that then check http://code.google.com/p/googleappengine/issues/detail?id=6928 and try to implement one of the workarounds suggested. (Essentially launching with -Dappengine.user.timezone.impl=UTC OR -Dappengine.user.timezone=UTC)