Error: AVD not created - android-virtual-device

bruno#ubuntu:/opt/android/android-sdk-linux$ sdkmanager --list
Installed packages:=====================] 100% Computing updates...
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;24.0.3 | 24.0.3 | Android SDK Build-Tools 24.0.3 | build-tools/24.0.3/
emulator | 27.2.9 | Android Emulator | emulator/
ndk-bundle | 17.0.4754217 | NDK | ndk-bundle/
patcher;v4 | 1 | SDK Patch Applier v4 | patcher/v4/
platform-tools | 27.0.1 | Android SDK Platform-Tools | platform-tools/
platforms;android-24 | 2 | Android SDK Platform 24 | platforms/android-24/
system-images;android-24;default;x86_64 | 8 | Intel x86 Atom_64 System Image | system-images/android-24/default/x86_64/
tools | 26.1.1 | Android SDK Tools | tools/
I get this error on create avd:
bruno#ubuntu:/opt/android/android-sdk-linux$ avdmanager create avd -n bruno -k "system-images;android-24;default;x86_64" --device "Nexus 5" --sdcard 100M
Auto-selecting single ABI x86_64========] 100% Fetch remote repository...
Parsing /opt/android/android-sdk-linux/build-tools/24.0.3/package.xmlParsing /opt/android/android-sdk-linux/emulator/package.xmlParsing /opt/android/android-sdk-linux/ndk-bundle/package.xmlParsing /opt/android/android-sdk-linux/patcher/v4/package.xmlParsing /opt/android/android-sdk-linux/platform-tools/package.xmlParsing /opt/android/android-sdk-linux/platforms/android-24/package.xmlParsing /opt/android/android-sdk-linuxError: AVD not created.24/default/x86_64/package.xmlParsing /opt/android/android-sdk-linux/tools/package.xmlCopying files
null
my java
bruno#ubuntu:/opt/android/android-sdk-linux$ java -version
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

I just had a similar issue, the error you get isn't very helpful but the bottom line is that you need to install some more things using the sdkmanager before creating the avd.
Split up the error you get and you'll see this:
Parsing /opt/android/android-sdk-linux/**build-tools**/24.0.3/package.xml
Parsing /opt/android/android-sdk-linux/**emulator**/package.xml
Parsing /opt/android/android-sdk-linux/**ndk-bundle**/package.xml
Parsing /opt/android/android-sdk-linux/**patcher/v4**/package.xml
Parsing /opt/android/android-sdk-linux/**platform-tools**/package.xml
Parsing /opt/android/android-sdk-linux/**platforms/android-24**/package.xml
Parsing /opt/android/android-sdk-linuxError: AVD not created.24/default/x86_64/package.xml
Parsing /opt/android/android-sdk-linux/**tools**/package.xml
Copying files
null
Now run sdkmanager --list to list all available packages.
If you are missing anything from the error output, install it. I.e.
sdkmanager "build-tools:24.0.3"
sdkmanager "ndk-bundle"
sdkmanager "platform-tools"
sdkmanager "platforms;android-24"
sdkmanager "tools"
and so on...

Related

unity xcode 14 archive build fails with undefined symbol

Describe the issue
Build target UnityFramework
*x Project Unity-iPhone | Configuration Release | Destination Any iOS Device | SDK iOS 16.0
Link UnityFramework (arm64) 5.4 seconds
enter image description here

Why is Winver showing another Version than Powershell?

Hello Guys! Why is Winver showing me Windows Version 21H2 but Powershell Command 2009?
Get-ComputerInfo | select WindowsProductName, WindowsVersion
Info: With my Personal PC at home Windows 11 Pro 21H2, it works with the command
Get-ComputerInfo | Select-Object -expand OSDisplayVersion
Unfortunately this Property doesn`t exist at my Laptop, or maybe in general at Win10 Enterprise?
You can mimic the way winver.exe shows the current Windows version by taking the values from the registry:
$v = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion'
# output like winver does
'Version {0} (Build {1}.{2})' -f $v.DisplayVersion, $v.CurrentBuildNumber, $v.UBR
Output:
Version 21H2 (Build 19044.1645)
UBR means Update Build Revision

CococaPods: pod install crashes the machine

In my react-native project, I did remove Podfile.lock and Pods folder to re-install them due to some version conflict. Installing the pods for with two floowing approaches
pod install with or without --repo-update flag at ios folder
bundle exec pod install --repo-update --project-directory=ios/ at
root,
the process gets stuck at generating pods project, the
system slows down, and after some minutes system shuts
down/restarts. How should I troubleshoot what is going wrong?
Also if VSCode is open, the code helper (renderer) also get consumes high percentage of cpu when pod install starts
System:
OS: macOS 11.3
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU # 1.40GHz
Memory: 308.68 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
Yarn: 2.4.0 - ~/<projectPath>/node_modules/.bin/yarn
npm: 6.14.10 - ~/.nvm/versions/node/v14.15.4/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /Users/amir/.rvm/gems/ruby-2.7.0/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK:
API Levels: 23, 25, 26, 27, 28, 29
Build Tools: 27.0.3, 28.0.3, 29.0.2
System Images: android-26 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.0 AI-193.6911.18.40.6626763
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 11.0.2 - /Users/amir/.sdkman/candidates/java/current/bin/javac
npmPackages:
#react-native-community/cli: Not Found
react: 17.0.1 => 17.0.1
react-native: 0.64.0 => 0.64.0
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
It's the flipper problem
I found the solution here
Running with --verbose showed me the library causing the problem, https://github.com/facebook/flipper/issues/2248#issuecomment-830060572 fixed it

How to use .NET Core 3.0 Preview8 with App Center Build

I've implemented .NET Core 3.0 Preview 8 into my app, but now when I try to use App Center, I get this error message:
The current .NET SDK does not support targeting .NET Core 3.0
==============================================================================
Task : Command Line
Description : Run a command line with arguments
Version : 1.1.3
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
==============================================================================
[command]/bin/bash -c /usr/bin/find . -name '*.sln' -type f -print0 | /usr/bin/xargs -0 grep -l 'MondayPundayApp.Droid.csproj' | /usr/bin/xargs -I '{}' nuget restore '{}' -DisableParallelProcessing
MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/msbuild/15.0/bin'.
/Users/vsts/hostedtoolcache/dotnet/sdk/2.2.300/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(137,5): error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.0. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.0. [/Users/vsts/agent/2.155.1/work/1/s/Src/MondayPundayApp.UnitTests/MondayPundayApp.UnitTests.csproj]
##[error]/bin/bash failed with return code: 1
##[error]/bin/bash failed with error: /bin/bash failed with return code: 1
Is there any way to use .NET Core 3.0 Preview 8 with App Center Build?
App Center Build doesn't currently support preview versions of .NET Core, but we can manually install .NET Core 3.0 Preview 8 using a post-clone script.
Here's a walkthrough I put together on the topic:
https://www.codetraveler.io/2019/08/23/using-preview-versions-of-net-core-with-app-center-build/
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --version "3.0.100-preview8-013656" --install-dir "$AGENT_TOOLSDIRECTORY/dotnet"

How to programmatically retrieve the version information of Visual Studio for Mac?

I want to retrieve the version information of Visual Studio for Mac during a build job of a Xamarin App. The goal is to include them as debug information in the binary. Is there a way to get the version number of Visual Studio, Xamarin.iOS and Xamarin.Android programmatically or with a command statement using msbuild?
Manually one can get the information under:
Visual Studio > About Visual Studio > Show Details > Copy Information [button]
=== Visual Studio Community 2017 for Mac ===
Version 7.6.11 (build 9)
Installation UUID: f7e73512-ad50-4119-a682-e2cf05031ad6
Runtime:
Mono 5.12.0.309 (2018-02/39d89a335c8) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)
Package version: 512000309
=== NuGet ===
Version: 4.3.1.4445
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.2
2.1.1
2.0.5
2.0.4
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
2.1.302
2.1.301
2.1.4
2.1.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.12.0/lib/mono/msbuild/15.0/bin/Sdks
=== Xamarin.Profiler ===
Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
=== Xamarin.Android ===
Version: 9.0.0.20 (Visual Studio Community)
Android SDK: /Users/christopher/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)
SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.1
SDK Build Tools Version: 27.0.3
Java SDK: /usr
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL
=== Apple Developer Tools ===
Xcode 10.1 (14460.46)
Build 10B61
=== Xamarin.Mac ===
Version: 5.0.0.0 (Visual Studio Community)
Hash: b40230c0
Branch:
Build date: 2018-09-27 11:41:37-0400
=== Xamarin.iOS ===
Version: 12.2.1.10 (Visual Studio Community)
Hash: f2a05edd
Branch: d15-9
Build date: 2018-10-31 18:55:57-0400
=== Xamarin Inspector ===
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1
=== Build Information ===
Release ID: 706110009
Git revision: d7cd66f5e3acd3d46ba0b94a0c935378f828bde0
Build date: 2018-10-31 17:17:12+00
Build branch: release-7.6
Xamarin extensions: bc9b985bfcb480b04a208a6d4045adc443a07857
=== Operating System ===
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Here is a simplified version of one of my Global.cs that contains version information obtained during the build:
Global template
namespace SomeVersionInfo
{
public static class Globals
{
public const string VS4MVersion = "SushiVS4MVersion";
public const string XiOSVersion = "SushiXiOSVersion";
public const string XDroidVersion = "SushiXDroidVersion";
}
}
macOS Bash file
VS4MVersion=`/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' /Applications/Visual\ Studio\ \(Preview\).app/Contents/Info.plist`
XDroidVersion=$(< /Library/Frameworks/Xamarin.Android.framework/Versions/Current/version)
XiOSVersion=$(< /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/Version)
sed -e 's/SushiVS4MVersion/'"$VS4MVersion"'/g' Global.template > Global.cs
sed -i '' -e "s/SushiXiOSVersion/$XiOSVersion/g" Global.cs
sed -i '' -e "s/SushiXDroidVersion/$XDroidVersion/g" Global.cs
Results:
namespace SomeVersionInfo
{
public static class Globals
{
public const string VS4MVersion = "8.0.0.869";
public const string XDroidVersion = "9.1.5";
public const string XiOSVersion = "12.2.1.13";
}
}
Some of the other version information can be retrieved with:
VisualStudio=`/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' /Applications/Visual\ Studio.app/Contents/Info.plist`
echo $VisualStudio
NetCoreSdk=`dotnet --version`
echo $NetCoreSdk
MsBuild=`msbuild /version | sed -n 4p`
echo $MsBuild
XamarinProfiler=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' /Applications/Xamarin\ Profiler.app/Contents/Info.plist`
echo $XamarinProfiler
XDroid=$(< /Library/Frameworks/Xamarin.Android.framework/Versions/Current/version)
echo $XDroid
SdkTools=`cat /Users/christopher/Library/Developer/Xamarin/android-sdk-macosx/tools/source.properties | grep Pkg.Revision | tail -c 7`
echo $SdkTools
SdkPlatformTools=`cat ~/Library/Developer/Xamarin/android-sdk-macosx/platform-tools/source.properties | grep Pkg.Revision | tail -c 7`
echo $SdkPlatformTools
SdkBuildTools=`ls ~/Library/Developer/Xamarin/android-sdk-macosx/build-tools | tail -n 1`
echo $SdkBuildTools
Java=`java -version 2>&1 | awk -F '"' '/version/ {print $2}'`
echo $Java
AppleDeveloperTools=`/usr/bin/xcodebuild -version | head -1 | sed -n -e 's/^.*Xcode //p'`
echo $AppleDeveloperTools
XMac=$(< /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Version)
echo $XMac
XiOS=$(< /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/Version)
echo $XiOS
MacOSX=`sw_vers -productVersion`
echo $MacOSX
Visual Studio for Mac seems to use a own version of NuGet, because nuget help prints a different version than listed in Visual Studio's version information. In our build job we download the latest nuget.exe and use it to restore a solution. Therefore we retrieve the version of the nuget.exe:
NuGet=`echo $(mono nuget.exe help | head -1) | sed -n -e 's/^.*Version: //p'`

Resources