Xcode can not Preview my KMM-App, how to solve this? - android

I have this Problem where Xcode can not Preview my Kotlin KMM App.
I created the App in Android Studio according to Kotlin.
The Android App works and the iOS App aswell.
But the problem is im new to iOS development and Xcode.
As far as I know I need Xcode to work on my iOS UI.
But as soon as I open the iOS App in Xcode, it says that the Scheme can not Build the Preview.
Here you can see the Error-Details
I already googled but couldn't find a proper solution.
The only thing I found out is that this often happens when the Project is not built correct.
Here's a Picture of my Structure:
Xcode Project Structure
I hope for a quick solution because this kills the fun for me atm.

Unfortunately I wasn't able to fix it.
So I created the project new and created it with CocoaPods Dependency Injection. After Hours I found out, that CocoaPods needs to be installed first. (Thanks for the Information Kotlin -.-)
After Installing it, I was able to install the Dependencies and now I had a "Workspace" for Xcode.
With the Workspace I was finally able to run my Code in Preview and on the Simulator as expected.
The "How to Setup"-Tutorial from KMM could be better imo.

Related

android studio development and flutter development related

Guys I have doubt regarding android studio development and flutter development.
I recently started flutter development; So, I downloaded flutter and installed. But some time ago I needed to access my my old android project and I am not able to access my old android project(sending errors after errors). Before this it was working fine, tried to solve the error but unfortunately wasn't able to.
So, I want ask is 'does flutter have influence over android development?' like after installation of flutter in system android development not possible in same system or something else.
Please let me know if anyone knows anything about it.
Thanks in advance.
Installing Flutter won't affect the Android SDK whatsoever. You can run both Flutter and Native Android.
Simply, got File --> Open --> and choose your project
Now select your old Android Project
That is how you can access your old android project.
Thank you.

Can I debug flutter android plugins from within VSCode?

I expect the answer is 'no' from what I've already found, but thought I'd ask the specific question.
I have a Flutter app which via a channel calls into an android plugin the java source for which is in the app source tree. Since one can also do java development in VS Code, I thought there might be a way to step into the plugin code while debugging the Flutter app, but so far no luck - the app doesn't "see" that the source for the plugin it's using is open in a VSC editor. Is there a way to configure for this? I've already installed the Java coding support extensions for VSC.
I like VSC because it's so lightweight, but if I have to use Android Studio to be able to code & debug both flutter and java plugin code in the same app that's fine. In which case how to configure for that?
Thanks!

How to debug NativeScript java code in Android Studio?

I'm quite new to NativeScript. Currently, one of my projects is using NativeScript to develop cross-platform app. It has a 3rd-party lib which is written in java. But the result is not as good as I expected. I was struggling to find the problem since the console didn't log valuable info regarding to native code.
Instead, I import the project to Android Studio which is under the folder of platform/android. But it logs error when I hit the "run" button.
I want to know:
Is it possible to debug native code directly with VS Code. At least print out java native error or cat log.
How can I debug native code in Android Studio? How to solve the problem I ran into?
I'd be very appreciated, if anyone can answer my questions. Thanks!
Let me start off by saying there's no official integration with Android Studio. All I can provide is a workaround that will make it possible.
Note: The steps provided below are tested with NativeScript CLI 3.1.1 and will probably work also with 3.2.0.
The first problem is you don't have "node" set in your global path so first of all, you need to add it to PATH. Node required for NativeScript to run. You can look at how to set it up here
If you want to be able to run the project with Android Studio you can follow these steps:
After you've done that you need to change the <app_name>/platforms/android/build.gradle file as described here
The above change will enable you to open <app_name>/platforms/android in Android Studio
Run <app_name>:clean task from gradle
Run the task default for Android Studio, that will prompt you for emulator or device on which to run:

How to use Android Studio with Cocos2d-x

I work as an android programmer for just under a year now, and I just started to learn about android game development. The framework I choose to work with is Cocos2d-x.
I have seen guides and tutorials on how to use Cocos2d-x with eclipse, but I'd really like to know if it's possible to be used with Android Studio.
From what I've read, it is now possible to build NDK projects with gradle in Android Studio, which is good news. Nevertheless, I have yet to find any information about C++ programming using Android Studio. Eclipse uses the CDC ( https://www.eclipse.org/cdt/ ) plugin to achieve this.
Is there anything similar to be used with Android Studio? I have found some C/C++ enabling plugins for the IntelliJ Platform, but they were no longer updated.
Has anyone else tried this before? Did it work? Can you provide a step-by-step guide, for a newbie like me, who's dealing with this kind of problems for the first time?
Thank you for you time,
haxm
Android Studio currently isn't well set-up for native programming. While the build system supports the NDK, there's no editor support for C++ files (it's not as if it won't work, but the IDE won't give you any editing assistance), and neither is there any debugging support. JetBrains has announced that they're working on new C++ support for IntelliJ, and this is something we're looking at for Android Studio, but it's not on the roadmap yet.
Recent version of cocos2dx v3 (from github for example)
have proj.android-studio project
At this moment I have no success to build it but maybe in future it will be fixed
I just went through the setup for this example code. The project compiles and has a ton of sample code. Scott Barta's answer still stands as an important caveat, but wanted to share the link in case it was useful.
I also found this useful for some NDK background/how-to.

Use Sublime Text 2 to develop Phonegap applications for Android

I've been using eclipse to develop Android apps with phonegap until, a few weeks ago, I decided to try Sublime Text 2. I found it to be so much better than the eclipse editor so I would like to keep using it. Only thing I'm missing is a quick way to test the app on the device inside Sublime.
Luckily, someone else also had the same idea and developed a plugin for this:
https://github.com/Korcholis/Andrew
Sadly, I cannot get it to work, I installed ant and pointed the plugin to adb but then nothing happens when I try to create a new project (and there is no error message in the console).
I also found this other plugin:
https://bitbucket.org/ucomesdag/sublime-android
But I have no idea on how to install and run it.
Did someone else found a way to do this?
A quick update into 2014.
As of PhoneGap Cordova 3.0, it is no longer required to develop Android apps via eclipse. You are free to use any code editor or IDE you wish as app building is done independently from eclipse via a simple command line.
cordova run android to package the .apk and install on any active devices detected by adb or
cordova build android to package the .apk only.
In your case, you can keep using Sublime and pop in the cordova run android command whenever you ready to go on a test run.
While I agree with Insane Coder that you should stick with supported IDEs to develop for Android, according to this link and existing Sublime Text 2 Ant support, you could build and develop your android project with this IDE (It will just take some time to set it all up... as opposed to using a supported IDE like IntelliJ or Eclipse).
Using PackageControl, look for "Ant". That will install syntax highlighting for Ant. Another plugin that enables the build command (ctrl+b) to work for Ant files, "Super Ant". You should be able to code for android in sublime text 2 with those installed.
On another note... Do you use windows? The Andrew project you link to, seems to have Windows compatibility issues. Apparently related to locating the "SDK" (he says sdk in Andrew's github page but, probably he means JDK?) in your hard drive. Which is probably a hassle because Windows typically installs stuff to "Program Files" and in code, that turns into "Progra~1" because of the space. In the link I give you there is another approach to it, so when you install the JDK set a folder that has no spaces in its name, like c:\java\jdk1.6.0_02 or something else that strikes your fancy. The problem you could be having with Andrew is that it isn't finding the jdk in your hard disk.

Categories

Resources