Quick Android Studio question.
Lately I've been creating a lot of new projects in Android Studio and picking the templates like "Blank Activity with Fragment" or "Navigation Drawer Activity" and seeing that it's not generating any Java Classes like it should.
All the /res files get created like normal but there is a lack of any java classes so I have to start from absolute scratch.
While starting from scratch isn't the biggest hassle in the world, I'm curious if I'm just an idiot and have missed a flag somewhere.
here's a shot of the file tree when generating a "Navigation Drawer Activity"
Info on my Android Studio/Project:
-Building with Target SDK 21, minSDK 14, build tools 21.0.1
-Android Studio version is 0.8.13
Thanks For reading, let me know if you need any other information.
I managed to solve the problem. You will need to disable plug-ins that are not the need. In my case, I have used them from GWT
Related
I've installed and set up Java JDK 17 as well as Android SDK (the manual way) on my Ubuntu 22.04.
From there, is it possible to develop an Android application in Java WITHOUT Android Studio ?
Developing through the command line or through a light IDE is fine by me, but there are very few guidance and information out there.
Thanks to enlighten me.
Sure you can! You'll need to type an awful lot of stuff though, that Android Studio does for you automatically:
You'll need to create gradle files to build your project, you'll need to create an Android manifest to describe your Android components and your app (permissions, themes, target SDK, etc.).
You'll need to create the code files containing your Android components (Activity, Fragment, Service, BroadcastReceiver, etc.). You'll need to create all your UI definition files in XML (layouts and other resources).
Then you can use gradle on the command line to run all the necessary preprocessors, code generators, compilers, linkers, resource builders and package builders to give you an APK which you can then install on your device for testing. And you can debug by writing lots of stuff to the logs and using adb commands to get the logcat off the device to see the log messages, exceptions and stack traces.
I have a problem running my project on Android Studio. I am working on an Android project that has a native Java library inside it. It was running fine all the time. But suddenly when I open Android Studio, I find this error:
There is also an error in the .gradle of the project:
It says that URI is not registered.
When Android Studio is started, I find this message:
It seems that there is something wrong in Java configuration, but I can't find out what is the problem?
It was running fine all the time
Not on Android, it wasn't.
It seems that there is something wrong in Java configuration
No. You are using classes that are not part of the Android SDK.
The java Swing and AWT API are not part of the Android SDK and thus aren't including with it. You must find an Android equivalent image library to use in your app. There are few good ones around just depends on what functionality you need to have available to you in you app. Try searching Picasso and or Volley. Picasso is very popular and well known. it has a lot of feature including networking functionality for loading images from the web. The Volley library isn't an image library but an networking library that contains some predefined classes for loading images over the internet.
So this just happened to me. I'm not 100% on the details of how I got it working again, but its roughly this (on my Mac):
Quit Android Studio
I went to ~/Library/Application%20Support/ and deleted the AndroidStudio3.2 directory
I relaunched Android Studio and I got some warning dialog about plugins not existing.
Chose the button that is something about reinstalling or fixing (or whatever isn't deleting or ignoring)
Another dialog comes up. There are a bunch of plugins that are in red. Deselect all the red ones. Then reselect all those ones that were previously red.
Android Studio asks you something and if you want to restart Android Studio. Pick the thing that includes restarting.
And once Android Studio restarts, chose to rebuild your project, and then it worked.
Good Luck and I hope this works for you too.
I am a beginner android developer, and I am running into this infuriating problem.
When writing in java, the IDE doesn't seem to recognize any of my imports, stating that it 'cannot resolve' any kind of views.
Furthermore, on the activity xml, it says, for all the xml elements, that the 'element is not allowed here'.
Funny thing is, only for certain projects that android studio behaves this way.And all of my projects were created and edited in the same way.
Invalidating cache/restart does not work.
You need to update your SDK if you have setuped sdk path.
I'm doing a REALLY simple app, a basic hello world to test AndEngine and I am currently having some problems when running it:
I set my emulator properties as RealMayo suggests in his videos and it should work but I get this error instead
07-23 13:10:23.014: E/AndroidRuntime(1485): java.lang.IllegalArgumentException: No EGLConfig found!
Anyone has encountered the same situation, or may know how to solve it?
I am almost tempted to not us AndEngine at all... as a simple app has been really difficult to run.
NOTE: I have found some posts but they are at least 3 months old and the use of emulators has been fixed not long ago.
Anyways Thank you! :)
make sure your AVD is at least Android version 4.0.3
see this thread http://www.andengine.org/forums/gles2/api-level-t8230.html
just to add a small addition to the answer above (answer #1): make sure along creating an AVD with API level 15 (Android 4.0.3), that imported AndEngine library's project target is also built with Android 4.0.3. To validate: right click on AndEngine library in eclipse project, choose "properties", in the left pane of opened window click on "Android" label; in right pane verify that "Android 4.0.3" checkbox is checked. If "Android 4.0.3" option is not listed there, just import it with Android SDK Manager.
The comment from Ravikumar11 about GPU helped me get this resolved.
Additionally, I had to:
Update the SDK with all options for my current API (17) and the general tools (binary downloads that are not API-specific)
As eclipse suggests after SDK update, run Check for Updates in eclipse and a bunch of stuff gets loaded subsequently
From there, I was able to run my AndEngine app in the emulator
I'm trying to develop an Android application with UI. So it's little complex for me to create UI with codes. I was using Visual Studio for long time where visual design is piece of cake. I also used Netbeans and Eclipse for java applications with UI but when it comes to Android I can't find a good way for UI desing. There is a visual design part in Eclipse but I want to use Netbeans as long as it's possible. Also I think DroidDraw is not good enaugh too. So I seached on web for Netbean's visual design tool and found nothing. If there is no tool or plug-in like this WHY? Thank you for any help.
Edit:
Well, long time passed. I just get used to code my ui. Also I am using Android Studio. 8)
edit
just saw that you've used DroidDraw.
There is official GUI designer included in ADT. Browse for main.xml (project/res/layout/main.xml) and doubleclick it :)
enjoy!
The combination of ADT (Android Development Kit) and eclipse 3.1 + will help you to develop the application graphically. Once you open the layout xml files, click “Graphical Layout” tab at the bottom of the section to open the graphical view. Now you can drag and drop components & also update layout.
But it is better to understand how the xml is defined in the layout. This will help you to fix any problems (in case).
Hope this helps.
Using Embarcadero RAD Studio XE7 (delphi or c++builder) allows for that task but it builds apk files with ome 10mo,