'Execution target' list on KMM Android studio is empty - kotlin

I'm trying my hand at Kotlin Multiplatform Mobile, and am trying to run the demo app on an iPhone. I am able to run it easily on the Xcode simulation but can't simulate it on Android Studio, I'm not able to se 'Execution target' list enter image description here
I can do it on Xcode but No when I try directly on Android Studio, What can I do?
enter image description here
I need to select 'Expectation target' but I can't see any option an the list

Related

compile apk on a folder "Android" already created previously in react-native

I'm new to react-native, I've seen tutorials but everyone uses expo. I downloaded this project where they don't use expo. I want to compile this application for android, to finally get an .apk
This application already has a folder called "Android" but inside it does not have its respective .apk. How can I generate it?
this is the repository:
https://github.com/zsajjad/BusinessCard
It would be great if you can attach screenshots of how I should do it
Note. I have the latest version of android studio and I don't see the option of "build"
commands like "gradlew" from the console, they don't work, it's as if I didn't have that command installed
Following instructions for build apk using android studio
Hope you installed node and react native on your machine. If not
please follow the link to install it.Install node and react native
open your command prompt or terminal and redirect to your download project - cd /Businesscard Master (change it according to your project location)
Now enter - npm install
Enter - react-native link
Follow the android related linking instructions on following link react native camera
Hope you know about android camera and storage permissions.
same thing for react native text detector. Because your downloaded project have that packages in package.json
Now open your project android folder in android studio using open existing android project.
Then select build your project from android studio build menu and run it also
Generate apk using build menu- same process you have to follow for native android project
You don't need to use the CLI, that's needlessly complicated and it obscures what Android Studio is actually doing. Here's all you need to do.
Open the whole /Android/ folder in Android Studio. This is your "project" similar to how you open a *.xed file in XCode. Except in Android Studio, you just open up the whole folder to get the build.
Android Studio will now prepare your project using Gradle. If there are any errors in the preparation it will tell you about them. Assuming your gradle and Android Studio versions are compatible and you got no errors, you're now ready to emulate, debug and create a production build. At this point the workflow is similar to using XCode. You'll see emulators under Tools -> AVD Manager.
In the file menus go to Build->Generate APK. You can choose between signed APKs, debug APKs and so on. You'll need the key file if you're signing the APK on your computer, otherwise there's also Google Play signing after you upload the APK.
TL;DR: Just open your /Android/ folder in Android Studio.
Side note: When Android Studio gives you popups to upgrade stuff don't do it. NEVER upgrade Gradle or Android Studio unless the RN / Expo team specifically ask you. This will break your whole project and you will need to rebuild the platform.

How can I install a React Native app without releasing it to any store?

I wanna be able to use my app on my iPhone or my Android phone without the need of releasing it to App Store or Google Play Store.
or just use EXPO tools if you are open to using expo development environment for react native
If your project is based on React-Native-CLI and your development environment is all set-up then just run command 'react-native run-android' in the terminal. It will generate a debug apk file which you can be found in the directory:
android > app > build > outputs > apk > debug > app-debug.apk
You can directly install this debug apk in your android phone by connecting the device in the debugging mode and run the above command!
In Xcode, add your Apple ID to Accounts preferences, described in
Adding Your Apple ID Account in Xcode.
In the project navigator, select the project and your target to
display the project editor.
Click General and choose your name from the Team pop-up menu.
Connect the device to your Mac and choose your device from the Scheme
toolbar menu.
Below the Team pop-up menu, click Fix Issue.
Xcode creates a free provisioning profile for you and the warning text
under the Team pop-up menu disappears.
Click the Run button.
Xcode installs the app on the device before launching the app.
Test iOS app on device without apple developer program or jailbreak
For IOS you must have a developer account firstly. And then, you can send your app to itunesconnect and get the app from testflight. Or You can run your ios app on device by using cable. But you dont run your app in developer mode.
For android you just need get the apk from android studio. But some steps there are. Follow this steps for get the apk.
How can I generate an apk that can run without server with react-native?
You can Side load your react native app in iPhone or iPad using Xcode
Open your_projectname.xcworkspace from ios folder in Xcode
XCode - Choose your destination device simulator or device from
Product -> Destination -> Select the device
Create a Temporary provision profile From project Target -> Signing
& Capabilities (Required only for physical device, for simulator don't
require this)
Build and Run your project
React Native's official site has a guide on how to install your app without releasing it.
The tl;dr is as follows:
For ios:
cd AwesomeProject
react-native run-ios
For android:
cd AwesomeProject
react-native run-android

How to get access to logcat in IntelliJ IDEA in non-Android project?

I don't see it at the bottom where it usually sits. I also tried "Log Viewer" plugin which should display logcat from any project, but that plugin fails to detect my emulated device.
I mean IntelliJ IDEA, not Android Studio.
Set
Gdx.app.setLogLevel(Application.LOG_INFO);
in your create() class, the log will be shown in the "Run Window".

iOS and Android Emulators for Visual Studio Code

I've installed the React Native Tools extension for Visual Studio Code. I thought this included the iOS and Android emulators for me to test my React Native app but when I run
React Native: run ios
I get an error that reads
Running the contributed command:'reactNative.runIos' failed.
Do I install these emulators separately?
iOS Simulator is distributed with Xcode. You can download it on developer.apple.com (accessible with a free AppleID) or from the Mac App Store.
It is only available on macOS, with Xcode 8+ requiring macOS El Capitan or newer.
If you want to get IOS Simulator in VS Code, install Xcode and open it, then go to Preference > Location and there you will see Command Line Tool. Just click the drop-down button and save something like Xcode 11(Version) and save it. Also, I recommend getting IOS and Andriod Simulator in VS Code.

Sony Remote Camera API sample Android app - Android Studio

I am having difficulty running the Android sample application for the Sony Action Cam API in Android Studio. I've tried to import the project into Android Studio, but I must not be configuring all the settings properly. Has anyone done this that can provide a step by step. My only experience with Android development was in Eclipse, but I want to try Android Studio as its the latest technology.
Maybe Sony can create a version of this project for Android Studio and make it available from the download page. Please!
I was able to build and run the latest (SDK 1.90) sample app after importing the CameraRemoteSampleApp sample project into Android Studio (Beta) 0.8.14. Please check again.
Best Regards, Prem, Developer World team