Xamarin build error - android

I'm using Xamarin in with Visual Studio 2015, Windows 10 64 bit. When building the project it shows the below warning:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.Debugging.targets(283,2): warning : Error: no package specified
It doesn't stop me from building and deploying but I'm not fond of errors anyway.
How to deal with such an error?

Related

Error 'The type or namespace name 'Android' could not be found...' in Visual Studio 2022

I'm getting this error in Visual Studio Community 2022 (64-bit) on Windows 10 Pro:
CS0246 - The type or namespace name 'Android' could not be found (are you missing a using directive or an assembly reference?)
I'm pretty sure the Xamarin code was working 1½ years ago but it was on my old Dell computer running Visual Studio 2019 on Windows 10 Pro.
What does the using Android.App do?
I tried to remove it, but that didn't help, it just produced the following error:
XA5104: Could not locate the Android NDK. Please make sure the Android NDK is installed in the Android SDK Manager, or if using a custom NDK path, please ensure the $(AndroidNDKDirectory) MSBuild property is set to the custom path.
Any suggestions?

incompatible target linker error when trying to build Android 64 bit application with Delphi 10.4.2

I am trying to build a mobile application for Android 64 bit. It works fine for 32 bit, but when trying it for 64 I get this error:
[DCC Error] E2597
C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidNDK-21-21.0.40680.4203\android-ndk-r21\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-ld.exe:
error: c:\program files
(x86)\embarcadero\studio\21.0\lib\Android64\Release\SysInit.o:
incompatible target
I get the same error for a few hundred of the .o-files in that directory.
I tried using cleanup and updating the SDK with the SDK Manager manually, but to no avail. This error also occurs when creating a new project.
What can I do fix this? Is there an easy way to do this?
Try removing Android platform from Delphi using Tools -> Manage Platforms and then removing any leftover data from Android SDK manually. Then restart computer and add Android platform to Delphi using Tools -> Manage Platforms.
This should then download, install and configure all necessary Android SDK's that are required by Delphi for Android deployment

Freshly setup Qt build for Android fails on OSX machine

I am doing a fresh installation of Commercial Qt on a new MacOS Sierra machine. I am trying to build a sample Qt app for android & iOS. I am able to build my QtApp for iOS without any trouble.
But on android I get the following error:
Buildfile: build.xml does not exist!
Build failed
Building the android package failed!
-- For more information, run this command with --verbose.
19:47:50: The process "/Users/MyComputer/Qt/5.7/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project t1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
When executing step "Build Android APK"
I have downloaded latest ndk r14b from here.
I have installed latest sdk that comes with Android Studio these days from here. And updated android sdkmanager to installed all platforms ranging from android-19 to android-25.
I have installed latest JDK 8 as well. I tested the android setup by building & running an android app from Android Studio which worked flawlessly.
Qt worked with Android pretty nicely. What has changed ? Should I do some tweaks because of some structural changes in Android ?
Copying PathToAndroidStudio/templates into PathToAndroidSDK/templates or PathToAndroidSDK/tools/templates as suggested here & here doesn't seem to be enough.
What more should I do apart from copying the templates folder as suggested in some other answers ?
You are trying to use Ant build system. Change it to using Gradle-based one or take a look here: The ant/ folder is suddenly missing from Android SDK. Did Google remove it?

Error creating a new Native-Application (Android) in Visual Studio

I just installed Visual Studio 2015 Update 3 and included Visual c++ cross-platform for Android. The installation was successful. After installation I created a new project Native-Activity Application (Android).
Upon building the project to execute it in an emulator, I encountered the following:
Error MSB3073 The command ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\bin\ant.bat" debug -Dout.final.file="C:\Users\Admin\Documents\Projects\Exp\Android3\Android3\Android3.Packaging\ARM\Debug\Android3.apk"" exited with code 1. Android3.Packaging C:\Program Files (x86)\MSBuild\Microsoft\MDD\Android\V140\Android.Common.targets 378
Why am I getting the error? Am I missing something?
I had gotten a very similar error when I created a new Native Android Application using Visual Studio 2015. It turned out in my case that there were additional errors in the output tab saying that it could not find android-19. So what I did was used visual studio 2015 "Tools->Android->Android SDK Manager" to install Android 4.42 (API 19) and I was able to build my solution.

IntelliJ 12.1.4 with Android Platform 4.2.2 on OSX compile error: Android SDK is parsed incorrectly

I have spent some time doing iOS development, but I am new to Android development. I use IntelliJ as my go to IDE for Java projects and really wanted to use it for my dive into Android development. Steps so far:
Installed Android SDK and downloaded the 4.2.2 platform and tools.
Created new project in IntelliJ selecting the Android Application module type.
Pointed the module settings to use the 4.2.2 Android SDK and Java 1.6.
Attempted to run the default run configuration built by IntelliJ.
I get the following compile error:
Information: Compilation completed with 2 errors and 0 warnings in 1 sec
Information: 2 errors
Information: 0 warnings
Error: Android Source Generator: Android SDK is parsed incorrectly. Parsing log:
Error parsing the sdk.
Error: Android Source Generator: [untitled2] Android SDK is invalid or not specified
I have not run into this yet, but in the Module Settings dialog I would check the following:
Project: Project SDK
Modules: for all modules: Module SDK. It's usually set to "Project SDK".
I also set the environment variable ANDROID_HOME.
If it still fails, I'd like to point you to I can't get IntelliJ to recognise my Android SDK.

Categories

Resources