android sdkmanager tool not found (flutter) - linux

first post here hello everyone;
im trying to setup flutter without android studio in Ubuntu 19.10, but im having some problems to set up the android sdk:
Android sdkmanager tool not found (/home/mateo/tools/bin/sdkmanager).
my sdk is actually located in /home/mateo/tools/cmdline-tools/latest/bin, how can i change the variable (or whatever it is) to point to the new location?
this is what i get in the terminal
i've already tried changing the following env variables, but the error is still there.
export ANDROID_SDK_HOME='/home/mateo/cmdline-tools/latest/bin/sdkmanager'
export ANDROID_HOME='/home/mateo/cmdline-tools/latest/bin/sdkmanager'
thanks in advance

Go to Start Menu
Search for "Edit the system Environmental Variables"
Under the section "User Variables", create New Variable and name it "ANDROID_HOME"
And give the path of "ANDROID_HOME" to your new location. Use browse directory to set SDK location
Create another Variable named "ANDROID_SDK_HOME" and provide same path as previous one.
That should do it

Related

Changing the Android Studio default domain?

When I start a new project in Android Studio, I always have to change the default domain name in the package name (the default is com.example).
Is there a way to change the default domain name to my domain so that I don't have to do this every time I start a new project?
The package specified in the New Project dialog in the Package name parameter will be saved after the project is created in the SAVED_ANDROID_PACKAGE parameter in the file ~/.config/Google/AndroidStudio2021.3/options/other.xml. The path is different on different OS and different IDE versions. Read for Find your configuration files
You can try the following ways:
The classic way to solve all problems: Invalidate cache and restart
Close IDE. Manually change SAVED_ANDROID_PACKAGE. Run IDE
Check permissions to the configuration folder
Close IDE. Delete (make a backup!!!) configuration folder. IDE will start as freshly installed and create a new configuration

"Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [C:\Android\sdk]!" in Android Studio

I could use the emulator properly two days ago and now it does not work.
I understand there are many people facing this problem. I have read many of them and tried the solutions stated there (set/change the environment variable of ANDROID_SDK_ROOT & ANDROID_HOME, re-install Android Studio, check avd file, etc.), but did not solve the problem.
My sdk file is in C:\Android\sdk and that is the place where Android SDK Manager in Android Studio found Android SDK as is existing. I have set ANDROID_SDK_ROOT value to C:\Android\sdk. I do not know what else to do. Is there anyone who knows how to resolve this?
I am using Android Studio 3.5.3 on Windows 10.
Thank you in advance for your reply.
I got the same problem recently and got it solved after doing some googling and trying..
It's because the emulator can't read path that containing non-ascii strings properly and in default AVD-specific files are located at C:/Users/%USERNAME%/.android/avd/, but somehow the error log doesn't give right hint and mislead us to focus on ANDROID_SDK_ROOT, so you only need to add ANDROID_AVD_HOME variable with a ascii path like ANDROID_AVD_HOME=D:\Android_avd and restart your IDE. After that your emulator will run properly.
More info https://developer.android.com/studio/command-line/variables
Update: You may need to create a subdirectory .android like C:\test\.android and add a ANDROID_SDK_HOME=C:\test variable, then add a empty .emulator_console_auth_token file which locates at the corresponding floder according to the error log, for me it's C:\Users\鍑濈传绉嬭悓\.emulator_console_auth_token.
After that you should run it without any error, I've already tested it.
https://github.com/flutter/flutter/issues/24988
https://www.reddit.com/r/AndroidQuestions/comments/6of9kp/error_when_starting_emulator_panic_broken_avd/dkgzing/
https://inneka.com/programming/android/panic-broken-avd-system-path-check-your-android_sdk_root-value/
You might not need to setup path. Try to run without path.

Copy emulators from other PC

I would like to copy Android emulators from one PC to another in order not to download them from Internet. I have AWD folder copied to new PC. How to tell new Android Studio to use these emulators? How to set path to them in Android Studio?
Edit:
After I copied emulators from other PC I got Missing system image error:
AFAIK, you don't need to set the Path. Android Studio automatically picks if you copy your <YOUR_EMULATOR_NAME>.avd and <YOUR_EMULATOR_NAME>.ini files into your ~/.android/avd folder.
<YOUR_EMULATOR_NAME>.avd is directory and it contains .img files and other files and <YOUR_EMULATOR_NAME>.ini is a text file and it contains path(is an absolute path to your .avd), path.rel (is a relative path to your .avd) and target.
I tried just now and it worked for me.
Update:
You need to copy system images and vendor images from your Android Library path mentioned below.
disk.systemPartition.initPath = /Users/user/Library/Android/sdk/system-images/android-26/google_apis/x86//system.img
disk.vendorPartition.initPath = /Users/user/Library/Android/sdk/system-images/android-26/google_apis/x86//vendor.img
Missing system image hints for, that you have to install these system images with the SDK manager. Those "download" buttons should do the job - if not, then use the SDK manager to install the ones it demands.
The kernel.path and the disk.systemPartition.initPath in the AVD's hardware-qemu.ini need to be adjusted to the Android SDK's location, so that it will be able to boot them (else it will complain, just alike the sceenshot shows). I don't have any disk.vendorPartition.initPath here, so this probably isn't required. if any hardware-qemu.ini has such a value, also adjust this one.

Dart The named parameter 'home' isn't defined

when I am trying to run an app in VS code, this message shows up "The named parameter 'home' isn't defined.".
It is a general problem for all flutter projects .flutter doctor says no issues.
I also tried creating a new project from scratch using android studio and Intellij and no progress .it says (theme: and home:) are not identified as named parameters.before that everything was perfectly fine ..please help! :(
As mentioned in the comments, it seems like you may have modified your Flutter SDK (there was previously a bug in the analysis server that made this easy to do accidentally by running quick-fixes).
There's an open issue about having flutter doctor detect this here:
https://github.com/flutter/flutter/issues/25220
For now, running the git clean command Günter gave in the comments from inside your Flutter SDK folder should get things back to normal.

Monkey X Export Setup

I'm using Monkey X Studio since yesterday and want to "export" the game I've made with it for Windows (glfw). So I built the Game in Release Configuration, took the .exe and the data Folder and created an InnoSetup setup for it. When someone else installed and started the game, the error message "OpenAL32.dll is missing" appeared.
"The Application was unable to start correctly (0xc000007b). Click OK to close the Application".
Do you have any idea how I can fix this issue and export a setup for windows?
Luca
Simply "OpenAL32.dll is missing.
You need to copy this dll to target computer during installation.
This dll may be present in e.g. System folder on your computer but is missing on different computer.
Find the dll and add it to installer (copy to appropriate folder).

Resources