Can we convert an Android Studio project for Unity3D? - android-studio

May be this question not fit here, but I didn't find any other medium to ask. I have a project in Android studio or eclipse, I want to open in unity.. because I don't want to rewrite again in unity.. any help or suggestion..

As i know they are two different compilers and you can't convert their projects to each other.maybe you can just copy some code if needed but work spaces are separate.

I think this can't be done, because both things are different libraries too (as one of the errors).

Related

How can I combine 2 projects in Android Studio Without Errors

I have two android projects. One is the login and membership screen and the other is my main project. I did both separately, in case it would be okay to combine them later, but I realized that I made a big mistake. When I tried to combine the two, it started giving errors all the time and I couldn't do it. Gradle files were probably missing, but I'm very confused. Can anyone help me how to do it easily?
Error:(1, 0) Plugin with id 'kotlin-android-extensions' not found
There is currently no easy option to "combine" two projects like to merge them without exceptions. But you can do the following:
The easiest way to combine two projects is to take the smaller project and copy all the files in /java /layout /drawable to the other project.
Then I would look up all files in /values and copy the values if you changed them.
After that you should look at the Mainfest and see wether you made changes there and transfer them. This will make most of the errors not come up because you just copied all the classes.
If you get the error anyway then go to your gradle files (build.gradle for project and module and settings.gradle if you use android studio bumblebee or newer) and check if there is any plugin or line you have in one project and not in the other and then add that accordingly.

Can we use Android-Studio Translations Editor for Flutter?

Translations editor was very good in dealing with strings and translating it to many languages. I wonder if I could use it for flutter apps.
if(yes) {
tell me how;
}else{
tell me the best way to translate texts in flutter;
}
thanks
now I think we couldn't use it.
so, for now, I can use excel to make CSV file of strings and use flappy_translator package to use it in a flutter app.
if there's a way to use android studio translations editor or there's a better way, please tell me.
So you want the handy Android Studio Translation Editor, however it only works with
strings.xml in a res/values folder in native Android projects, as it seems.
But I can offer you something similar. I found the Android Studio Plugin Easy i18n
Go to File->Settings->Plugins (windows) and search for the plugin.
After Installation, you can work with JSON files, I put them in assets/translations:
And added the dependency to the whole folder in my Pubspec.yaml:
assets:
- assets/translations/
And if you open the Editor via View->Tool Windows->Easy i18n, you can edit them, very similar to the Android Studio Translation Editor:
I use the values from the JSON files with the Easy Localization plugin.
Disclaimer: I don't think the authors of Easy i18n and Easy Localization are the same team, at least as I can tell. And I am in no way related to these projects/authors. This is just what worked for me. On my journey, I stumbled across this StackOverFlow post multiple times, so I thought I'd share.

How to debug Android Studio Project (using NDK and JNI) line by line to see the workflow?

I was using Visual Studio and it's Debug mechanism is really useful to me. With many header and C files in 1 project, just a simple F10 it could take me a tour around from the beginning of the main() function so that I could see the sequence of the code being executed.
Now I'm jumping into Android Studio and start with a project using NDK, JNI (this project for example: https://github.com/googlesamples/android-ndk/tree/master/gles3jni), it makes me confused because there're many .java files and others C++ (native code) files and I don't know which code from which file is executed first and how it goes on.
My Question is: I'm looking for a way to debug in Android Studio line by line from the beginning to see its workflow likes how Visual Studio did but all I got from searching is how to start from a breakpoint when debugging.
I have tried putting the break point in the onCreate() method of the launcher activity and use F8 to Step Over and F7 to Step Into but it doesn't work as i expect. It keeps taking me to the super class Activity.java and GLSurafaceView.java instead of taking me to the C++ code. Is there any way to do so in Android Studio and how to do it?
I have tried with others project but the problem still remain the same. Hope someone could help.
This won't happen. Your app (the Java boilerplate code) is set to respond to many system events that happen when the user works with the app and the device on which the app is installed. If your c++ code is a piece of monolythic straightforward algorithm, you can set s breakpoint in the beginning and really follow step by step. But with Android Studio, even this process is not as easy as with Vusial Studio. To begin with, it's always remote debugging, dependent on delicate communication protocols.
This said, you can try to set up Microsoft Visual Studio as your IDE for debugging native Android code. It is surprisingly robust, and also may be more familiar to you.
Since you've asked about Android Studio, I will answer about that - I am not familiar with Visual Studio for Android and perhaps it is better for what you are asking.
In Android studio such debugging is very hard - although some people said they managed to get it to work, I wasn't able to. Especially in a complex environment. So, what I'm doing is extensive logging, with as many details as possible, and visual debugging - put some text view on the screen and update it with the info you need. This could be quite powerful in some cases. Or, alternatively, make some changes in your ui or your scene as a result of certain conditions you define - so you could see the visual effect. Again, much less useful than debugging, but can still be quite powerful.

Android Studio Not Recognizing Imports in TextView

I want to watch android sources code, but Android Studio has so many errors in base Android code. How do I fix these?
Since no one has jumped in here to help with this...
The longer answer here is that the imports (in red) are failing because Android Studio can't find them. So all the calls made to those libraries are failing. So ALL your code after that is full of errors.
For instance, the android.annotation.ColorInt seems to be broken. A quick Google search provides THIS: https://developer.android.com/reference/android/support/annotation/ColorInt.html
Which tells me that the reason that dependency is broken is because whatever you have there is deprecated and should now use a new reference.
Continue with this sort of research and your problem is solved.

Visual Studio: Exclude From Project Quickly

I have got thousands of files/folders inside a solution. For some reason I have to exclude them all and then include again in the project, to get the latest list of files.
The normal "Exclude From Project" in visual studio menu takes too much time. Is there a quick way to do it?
Thanks!
Put them all into one master folder and include that folder.
If some are files, you may also want to compile them and include the DLLs or the equivalent in whatever language you're using.

Resources