I have been searching for the past days on a tutorial on how to use https://developers.google.com/j2objc/guides/getting-started to convert my Android App (I have the source code) to IOS and I have found nothing.
If I try to convert individual .java files in my project, I get this error:
error: cannot find symbol
in every single file. Obviously, what I have been doing is wrong.
How do I use it?
Thank you
Related
I want to convert my java project to Kotlin, there are more than 500 java files. How can I convert it into Kotlin easily?
I know that we can convert one by one java file to Kotlin, But there are many files.
Can I convert it at once?
You can definitely try. You just need to select a module or a folder in the Project navigator and select Code --> Convert Java file to Kotlin file:
You, though, need to keep in mind that the conversion is not perfect. For instance, Android Studio will have to guess whether a whole lot of properties are nullable or not. It will not get them all right... you will get a lot of crashes.
My suggestion would be to batch files in sensible chunks, so you can fix those Kotlinized files without getting swamped with errors.
Note: after converting a file to Kotlin you still will need to review it. A lot of things will be kept in Java for the sake of safety, but now that you have Kotlin you can use collection extensions, default constructor parameters, ...
Select your app folder and go to Code Convert Java File to Kotlin File
Then after you convert the file,it says kotlin not configured.Click the Configure text then select the type of module you want to apply kotlin and it comes with the latest kotlin version press ok
N.B After you convert the code,you must convert some parameters that the compiler found it as a warning or error message.
It's easy, android-studio will do most of the work for you. To convert the existing javacode into kotlin, simply select the src/main/java folder in the project and choose Code->“Convert Java File to Kotlin File”. Android studio will then try as best as it can to convert all your java-code to kotlin-code.
I'm using justinMind and I get .vp file.I am able to convert it in .html file but how can I convert it in .xml or .apk?I have tried to convert .html to .xml by using .tidy but It doesn't give me proper layout in my androidstudio.
I don't know this SDK, but from I quick search, I found this post on there forum :
https://www.justinmind.com/community/topic/can-justmind-export-the-prototype-directly-to-the-android-studio-project
For long term save, here is the two post :
Question : I can use the software for simple designing and prototyping. It will reduce the app build time if there is a way to export the files as an android studio project. Is this possible?
Answer
Hi there,
Unfortunately that is not possible. However, you can utilize the
generated CSS and Javascript, which may help reduce app build time.
Best,
Danielle
So you need to use the generetad HTML/Javascript/Css files with a WebView. So no, you can't create a project, only the HTML files.
I am working on an android application in which i need to convert MS office files to HTML using Apache Poi.
Till now i am able to convert .xlsx to htm using the following project Source-
http://display-msoffice-docs-android-with-apache-poi.googlecode.com/svn/trunk/TestOfficeAndroid/
i can see that there is a WordToHtmlConverter class in org.apache.poi.hwpf.converter package which can convert .doc file in its main method as its main() method takes the input file path and output file path as argument.
But when i invoke the main method of WordToHtmlConverter, it gives classnotfound exception exception for java.rmi.unexpectedexception.
There is no java.rmi.unexpectedexception class for android.
How can i overcome this problem.
Any help or guidance will be appreciated.
Have you tried Docx4j? I don't know if it's the answer for you, because I've only just started working with it. (I came across your question as I was looking on Stackoverflow to see if anyone had been using it to create HTML5, which I think should be fairly easy to do)
So as mobile developers, every time we translate one of our apps we have to translate both Android and iOS strings files. These files contain 90% of the same strings just the file is in a different format.
Does anyone know if there is an NSLocalizedString override to read from Android compatible .xml files? or if this is even possible?
Alternatively, is there a command line tool to convert between the two formats?
This does what you need, but not from the command line.
http://localise.biz/free/converter/ios-to-android
The full system has an API though. If you register you'll be able to pull your translations into .strings or Android XML files from the command line, or programmatically via a simple script.
So it turns out this kind of tool doesn't exist. I created a toolchain and posted it here.
If there is activity I will develop it further.
For a recent project which already had 19 translations, I was also looking for a script to convert the XCode Localizable.strings files to Android Eclipse format.
I found convertLocalizable.rb but I can't work with ruby, so I've created a Javascript based on it, see link below. You have to cut and paste each file but it works great.
Javascript XCode Localizable.strings and Android strings.xml convertor
Here's a simple script that will generate iOS Localizable.strings from Android strings.xml files.
Try Twine - a robust project for converting resources.
I am using Eclipse to write my Android app and I keep getting this error when running it. I have no idea what the error means or how to go about debugging.
I should add that this all started when I wrote a method to parse an XML file. Before I wrote that, the app worked fine. I tried adding some try/catch block that contain "log.e" statements, but I don't see anything strange in the log.
Does anyone have any idea?
The error message is in the screen shot below:
It means you don't have the source files of the Android code in you eclipse workspace. check
Android source
By default you only have the compiled class files in you android.jar. if you want to see the source(*.java files) you need to add them yourself. So, you have no source files at all by default
I have had this error come up before for a lot of reasons. Almost always it is because I tried to refer to a resource that either is not there, or is incorrectly formatted. Seeing as how this started when you worked with one of your XML files I would check there for incorrect formatting.
Although this error is referring to the fact that you do not have the full android source code, having it will not fix the error, it will only allow you to see where the source code is failing either to find or open your XML file.