I recently started to learn react and want to know if, It is possible to convert a react-native project to a normal android project that could be continued and coded completely in Android Studio?
I know I can open android directory with android studio and do some changes at the current state (while react-native still need) but I want to completely remove any dependency of react-native and node module from continuing developing the application.
If no, (that I expect the answer be this!) please describe a little about reason. (If I be correct, in react-native, layouts are same as original android widgets, but I'm not sure about possibility of converting ES6 to Java.)
Related
Hey guys I have read almost all of the questions & answers on how to use jfxmobile, or Gluon to wrap a javafx project with gradle and to run them also on an android device. Also I know that one could use Intellij IDEA for instance have a project that is based on javafx and also handle some android classes/methods using FXActivity.getInstance(). But I have an android app in android studio with many android native code, and now I want to add some other code that relates to my application but is in javafx and I want to add them as a separate feature on my android application (not a sepparate app per say); just add them in addition to other features that were developed before using android native code in android studio. The question that I have is that how could I join those javafx apps to as a different feature in my application? I have seen Kokos sample for javafxports, but there are some issues with the Android Manifest File for now and I can't run it also it is a project of almost 5 years ago and I am not sure if the same procedures apply today with many updates. I just want to know how hard it is to do as I wish (and mentioned above)? and is it doable or there might be many issues on the way and I am better off to code for about three months of worth development with android libraries? *Time is really important in this project.
I'm getting red letters in my AndroidManifest.xml and don't understand what they mean. At the moment everything seems to be working as should. But will I get any problems down the road?
Nope, Android Studio can't understand the Android content when a Flutter project is opened.
It can either understand the Flutter directory structure when Flutter is opened. This is what enables Code Completion and other nice features when making Flutter apps.
If it's a simple Android project, then it can easily understand the Gradle files and your Java/Kotlin.
What this means for you as a Flutter developer is that, when you are editing native Android or iOS code. You will not get code completion. Android Studio will not be able to tell you about the errors in your code.
The Flutter team is working on this. So that you can have all the cool IntelliJ features for editing Native code EVEN when you have a Flutter project is opened.
Also, I think if you open the android separately, then you should be able to see properly. (Maybe, I'm not sure).
You can now open the Android part of your Flutter project by right clicking on the project name in the project window, choose Flutter and then Open Android module in Android Studio.
The opened Android project will have code completion and all the red letters will most likely turn other colors :)
I'am trying to integrate React Native to my existing Android app using the newest React Native version of 0.45.1.
The project setup is standard as created by the init command. In the android subfolder I checked out my existing Android app and followed the steps from Integration With Existing Apps
When running react-native run-android its gets me:
ENOENT: no such file or directory, open 'app/src/main/AndroidManifest.xml'
This is obviously due to my non standard Android project structure as I have several modules and my main module is not named app.
Now the actual question: Is there a way to configure the React Native layer and to tell it where my Manifest and possibly other required files reside?
Got is, pretty simple actually. --help is your friend.
--appFolder [string] Specify a different application folder name for the android source.
is exactly what I was looking for. For anyone who has similar troubles, there are some other interesting options as well.
Why don't we have a file similar to the .xcodeproj (for XCode applications) or an .xds (for Sencha Architect Projects) for our Android Studio Project?
I'm pretty sure a good number of you here have experienced the frustration of trying to import a project you see online in order to piece it apart better and learn how it works. I get that we are supposed to Import Android Projects built using Eclipse and Open Android Projects built using Android Studio.
However, why is it that we have to go through File -> Open -> then pick out the directory of the Android Studio app that we want to open? And the thing is, Android Studio doesn't seem to know it's an Android Studio project until it tries to open and build it. In the screenshot I have below, I have the sample Android Studio projects of ARToolKit, but I've only imported two of them.
As you can see, only those I've imported "can be seen as an Android Studio Project" as indicated that they have the Android Studio logo instead of a Folder.
This can be an issue for those just starting to develop in Android Studio on their own and they try and use existing projects (build from Eclipse or Android Studio) and they hit a snag with just trying to import the projects for reference. They might not know that they should import the folder and not the projectname/src subfolder. It adds to the "steep learning curve" that Android Development has if opening/importing projects aren't streamlined to a degree.
To sum up, my question is:
Why don't we have a single file that we can open that would in turn open Android Studio and import and build the project if it isn't built yet?
Android is not iOS. iOS development is only possible in xcode, hence it makes sense they added a shortcut to open it in xcode directly with a .xcodeproj file. Make life easier for iOS developers.
Android development however can be done outside of android studio as well. Eclipse is just one example, there may be other IDE's that support this. This is possible because android has standalone SDKs and tools that third party applications can use. iOS does not.
Imagine you are working on an android project in android studio. Then your boss tells you someone from 3000km away is going to help you. This guy may be using android studio, but maybe he isn't. When there are multiple options that developers can choose from individually, you do not want to pollute version control with files that you are using, but others may not care about. Each their environment.
This is merely a logical conclusion that you can come to by comparing. The "real" reason why this was done can only be answered by the people that created (adapted intellij) android studio.
This has been very frustrating to me too.
I try to give you a "beta" answer, waiting somebody to confirm it to me.
An Android project is just the composition of many parts that in some cases are concurrent to create the apk file.
It's just like what happens for the whole java projects: you have the main/src/java, the main/src/test, the maver or gradle files, the gradle or maven wrapper, the manifest, the configuration etc.
So you won't have a single project, but a series of folders that can contain many "flavours" or "versions" of the product itself.
The only help it is given to us is the Android studio icon that appears if a folder contains an android project in its subfolders.
I don't know if I have really answered to you, I just have given you my impressions and my thought.
I've already written a game engine in java using eclipse and opengl es, I had one project (an android project) which contained both of my packages
com.logic.engine
com.logic.testapp
I wanted a way to keep my engine and test app seperate, I've made an earlier post about how this is done, and I figured out how to reference one project in the build path of another (or just creating a jar file).
My problem is that, lets say I now have my engine all wrapped up in an android project com.logic.engine, and now someone would like to use this engine to create a game, so they create an android project com.someclient.game, well now because we have one android project referencing another, it crashes everytime.
Now obviously i need the android sdk in my engine package in order to reference things, but its also required on the client app, since the activity is what is actually being run by android.
I guess my question is, how can i create a project for my game engine without it being an android project, but still referencing the android sdk, and without causing it to crash the client app using it?
edit:
note: the client app utilizes the engine flawlessly when its in the same project folder, it isn't until the engine is referenced from another project containing the android sdk that it crashes, so im 99.9% positive it has nothing to do with my code
Your game engine project should be an Android library project. See Working with library projects.
Use an Android library project.
Just a fix for the two links above that no longer work
Android Library Project
Example Library Tut