how can I run hiero in android studio? - android

I have created a libgdx project using the installer from http://libgdx.badlogicgames.com/download.html and the Gradle extension for Android Studio.
Example for IntelliJ IDEA: Go to the Hiero class, right click and select Run Hiero.main(). On the Run >configurations popup that will appear, select the Desktop module, and click Run.
How do you do this under Android Studio?

I just found out the procedure. I leave the answer for those fellow beginners who may come across this problem like me:
go to structure tab beneath the project tab and the rest is the same as the above example for IntelliJ IDEA

Related

Add Android Run/Debug configuration for Flutter project

I am working with a Flutter example project where it shows how to share a FlutterView inside an Android application (and iOS also).
While working with it I tried this:
I make changes to the android project like changing the theme color, if I do hot-reload/run for main.dart I don't see the changes reflected in the running app. I have to stop it from Android Studio and run the main.dart again to see the changes.
To solve the issue I was thinking to add a run/debug configuration for Android app module. So that I could run android app and not main.dart.
Is there a way how to achieve this in Android Studio?
One solution for me was to open the android(/flutter_view/android/app) project from a new window in Android studio. I could run the app this way.
(But here I encountered another issue in case anyone has the solution).
According to my understanding you face problems when you open your project and try to run.
Android studio asks you to configure your project to be able to run...
It's easy to solve near to run button you will find "add configuration" button just press then from left side select "flutter" and put in the field "entrypoint" your main Dart file path main.dart...
EX. E:/project/lib/main.dart....
Then from top right corner press "create configuration"...
That's it.
For Configure your Flutter app on Android you have to Upgrade Gradle file..
So Go to the Tool and at you will find AGP upgrade Assistant..
It Download new Gradle file then its Config automatic..

Is there any way to generate sequence diagram from android studio

I have created sample android project. Now i have to create sequence diagram for that. Is there any way to automatically generate sequence diagram for android project from android studio.
Finally I got the solution.
I have installed a plugin, previously called SequencePluginReload from Android Studio, now called SequenceDiagram
It is very easy to use and works like charm.
I have downloaded SequenceDiagram suggested by #venkatesh in above answer, but didn't understand how to use it. After searching I found how to use it.
Download the zip file in the above link.
Go to Android Studio>Preferences in Mac. For Windows File>Settings.
Search for Plugins in search box. Then in right click on 'install plugin
from disk'. Browse for the downloaded zip and select it, then Apply and
it will show icon to restart android studio. Do it.
Now go to any method in your java file and right click on it and click on 'Sequence Diagram'. And you will find your diagram in a tab besides Debug,Terminal, version control etc.
I think it's hard to get a sequence diagram. But we can generate a class diagram from Android Studio. We need to install an external plug-in.
Following this references below:
How to generate Class Diagram (UML) on Android Studio

Generating UML diagram in Android Studio

What is the best tool for generating UML diagrams from Java source files in Android Studio? Are there any plugins similar to ObjectAid in Android Studio.
There is no Visual Paradigm EE shown as described http://www.visual-paradigm.com/support/documents/vpuserguide/2381/2385/66578_creatingauml.html
Try Code Iris. You can install it in Android Studio as a plugin.
Open Android Studio Settings: File -> Settings. Look for Plugins, then hit "Browse repositories..." and type "Code Iris". Install and restart your IDE.
There is another plugin that could be interesting too, which is PlantUML. You may need to install Graphviz in order to make it work.
Code Iris allows to export your diagram into a json file.
PlantUML allows to save your diagram as a PNG file.
Hope it helps.
Two things you need to understand.
You need to first install VP and then the plugin, for this to work.
VP is tricking you to think it's available in the CE edition, when in
fact it is not. They state at some point that this feature is
only available for the Standard Edition and above. So the name of
the plugin is tricking you into this. Thus you're limited to a 30
day trial.
They say:
...Visual Paradigm Community Edition supports running inside Eclipse, NetBeans, IntelliJ and Visual Studio. Without leaving your IDE, you can review your software design described in UML.
To install the plug-in:
The proper path to go is from the File item, go to Settings. Then in the new settings window, scroll down (left side) to Plugins. Click on it and the Plugins menu (sub-window) will open. At the bottom of that there is a button called Browse repositories.... Click on it, and there will be yet another window (phuh!) with a very long list of plugins. There are hundreds, so use the search bar in that window and type "Visual Paradigm", this will give you only one choice, the "Visual Paradigm SDE for IntelliJ IDEA (Community Edition)". Click on it and then again on the right side, on the green button that says Install plugin. Accept the install and then restart AS.
To use the native windows app:
To create an UML from reversing the Java code in VP, look at this post.
For creating UML class diagram in android studio use the following steps :
Press Ctrl+Alt+S (or go to Settings), then go to the Plugins tab, press "Browse repositories" button then search "Visual Paradigm SDE for intelliJ" install this plugin into Android Studio and restart the IDE.
After successfully install the above plugin follow the step which are listed on following URL:
http://www.visual-paradigm.com/support/documents/vpuserguide/2381/2385/66578_creatingauml.html

how do i add the facebook module to android studio

hi i have been trying to add the facebook sdk to my project in android studio its in my file tree and i can use it limitedly, eg; i can use a facebook login button but if i run the app it crashes at start up, i think i have to import the module for it but android studio wont/cant find it, im still new to android so please tell me if im just missing something simple, here are some screen shots of me going through the motions,
by right clicking on the project and pressing f4 i go to module settings
from here i select my project, go to the dependencies tab and select the + from the top right corner
,
but this is what i get
so my question is should the libraries:facebook be here or am i in the wrong menu? this seems a little different to the tutorials ive been watching but ive put this down to me using android studio 0.5.8 can anybody give me any suggestions as to what to try next?
The answer you're looking for is precisely described here... using facebook sdk in android studio
and here, How to import a Module on Android Studio 0.5.1?

How to generate Class Diagram (UML) on Android Studio (IntelliJ Idea)

I've try to search and found this link, but Ctrl+Alt+Shift+D doesn't work.
I also use find Action Ctrl+Shift+A to find action about diagram and uml but found nothing.
I also search for the uml plugin,
but most of them didn't work with new version of intelliJ (I didn't try it I just read the comment).
I found a free plugin that can generate class diagrams with android studio.
It's called SimpleUML.
Update Android Studio 2.2+:
To install the plugin, follow steps in this answer: https://stackoverflow.com/a/36823007/1245894
Older version of Android Studio
On Mac: go to Android Studio -> Preferences -> Plugins
On Windows: go to Android Studio -> File -> Settings -> Plugins
Click on Browse repositories... and search for SimpleUMLCE
(CE means Community Edition, this is what android studio is based on).
Install it, restart, then you can do a right click on the folder containing the classes you want to visualize, and select Add to simpleUML Diagram.
That's it; you have you fancy class diagram generated from your code!
For those who want to use simpleUML in Android Studio and having issues in running SimpleUML.
First download simpleUML jar from here https://plugins.jetbrains.com/plugin/4946-simpleumlce
Now follow the below steps.
Step 1:
Click on File and go to Settings (File → Settings)
Step 2
Select Plugins from Left Panel and click Install plugin from disk
Step 3:
Locate the SimpleUML jar file and select it.
Step 4:
Now Restart Android Studio (File → Invalidate Caches/Restart → Just Restart)
Step 5:
After you restart Right Click the Package name and Select New Diagram or Add to simpleUML Diagram → New Diagram.
Step 6:
Set a file name and create UML file. I created with name NewDiagram
Step 7:
Now Right Click the Package name and Select the file you created. In my case it was NewDiagram
Step 8:
All files are stacked on top of one another. You can just drag and drop them and set a hierarchy.
Like this below, you can drag these classes
I have managed to to do it in a way. Perform all the steps as referenced by Michal Rowicki above.
Open Visual Paradigm software.
Create a new Project
There would be an option on the Tools bar above that states Code
and select Instant Reverse... from the drop down menu with Java
language(or other)
Select your application folder where your project is located and
add it to the project(i have selected the complete folder
application)
The application should now appear on the left pane in Class
Repository
Then all you do is right click the project that you have added and
select Reverse to new class diagram
Select either you wish to have the packages included in the class
diagram or just the class diagram of the project
Then it should appear on your screen and customize it as you wish
However i do not know if the plugin in Android Studio was necessary nevertheless it has worked in a way for me.
type Ctrl+Alt+S (or go to Preferences)
go to the Plugins tab, press "Browse repositories" button
search: Visual Paradigm SDE for IntellIJ (Community edition) Modelling Case Tool
install it.
You need to install proper software. Now it should works well.
I guess that UML Class Diagram is only available on Ultimate Edition.
To show UML diagram click right mouse button on specific class -> Diagrams -> Show diagram...
Or you can in editor click Ctrl+Alt+Shift+U.
You could append new classes to diagram by drag and drop. On the top of window you could choose more options. To save UML you should just click on save icon.
There is Code Iris which you can install by going to File -> Settings -> Plugins -> Browse Repositories, then find and choose Code Iris.
Restart then you will have a new Code Iris tab.
Update 24.3.2016
I have found this guide from VP https://knowhow.visual-paradigm.com/technical-support/running-vp-in-android-studio/ created on September 8, 2015.
Good to know - it is possible to integrate VP into Android studio (in my case 1.5.1) now. Do not forget to backup your Android Studio settings (you can find them in Users%userName/.AndroidStudioX.X on Windows) ahead of installation.
I was trying to make it work, but created vp project did not contain any diagrams. Maybe someone else will have more luck.
I was using this manual http://www.visual-paradigm.com/support/documents/vpuserguide/2381/2385/66578_creatingauml.html to make Visual Paradigm working in Android studio, but action in 2. did not invoke dialogue in 3. So I Have asked Visual Paradigm support for help and they replied that Android Studio integration is not supported right now.
Reply from Visual paradigm reply from Apr 17 2015:
Thank you for your inquiry and I'm very sorry that at the moment we
only support integrate with the standard IntelliJ IDEA, but
not integrate with the Android Studio. We may consider to support it in our future release, and I'll keep you post once there
any update on this topics. Feel free to contact me for any questions
and wish you have a good day!
This post was deleted, so I will try to make it more clear.
As such I am considering previous answers as misleading and not useful. Therefore I thing that it is important for others to know that, before they lose their time trying to make it working.
Solution:
Run Visual Paradigm
Do as below, pointing to Android Atudio
directory on step 4
Open Android Studio and right click on project
This Kotlin state machine library has PlantUML export feature, it is not integrated with Android Studio but it is easy to visualize state machine structure on PlantUML web site.
https://github.com/nsk90/kstatemachine
I'm developing with android studio 2+.
to create class diagrams I did the following:
- install "ObjectAid UML Explorer" as plugin for eclipse(in my case luna with android sdk but works with younger versions as well)
... go to eclipse marketplace and search for "ObjectAid UML Explorer".
it's further down in the search results.
after installation and restart of eclipse ...
open an empty android or what-ever-java-project in eclipse.
then right click on the empty eclipse project in the project explorer
-> select 'build path'
then I link my ANDROID STUDIO SRC PATH into my eclipse android project.
doesn't matter if there are errors.
again right click on the eclipse-android project and select: New
in the filter type 'class'
then you should see among others an option 'class diagram'
... select it and confgure it ... png stuff, visibility, etc.
drag/drop your ANDROID STUDIO project classes into the open diagram -> voila :)
hth
I open eclipse(luna, but that doesn't matter).
I got the "ObjectAid UML Explorer"
that installed I open an empty android project oin eclipse, right
You can use the simple program StarUML. The trial version is unlimited and can do almost anything.
Onced installed you can use it to generate great number of uml digrams just by pasting the source code. Class diagram is just one type of it. (It understands not only Java language but C#, C++ and other)
P.S. The program is great for drawing architectural diagrams before you start to code the program.

Categories

Resources