Xamarin Android Build - No package specified - android

When creating a shared library application in Xamarin for iOS and Android, i can't install a blank project to either an Android device or the simulator. I get the following error:
Error - no package specified
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets:
Warning: Error: no package specified (test.Droid)
I have tried a variety of fixes but i don't really know what package it is referring to.
Any ideas?

Had same problem. The worst part is that there is not too much to show just says deploy failed with one error message: no package specified. After spending hours looking thru the build logs. It boiled down to one very simple solution:
Repair your Xamarin installation.
Make sure Visual Studio is closed.
Go to Apps & Features.
Find Xamarin in the list.
Click Modify.
Choose the repair option.
That's it.
P.S. By me this trouble started when I moved around the SDK from folder to another. I was consolidating the SDK used by Xamarin with two(!) other ones used by Android Studio.

Related

Struggling Android kit Installation Qt

For the past week, I have been struggling to figure out how to run a Qt quick application with the Android kit. I have encountered numerous errors. Earlier, my OpenSSL settings on Android where not working, but I was able to fix it by downloading new OpenSSL files from online. After that, all the settings in Android settings have a checkmark to signify that they are working.
After that, I tried to run the program with the Android kit. However, unlike for you in the videos, Qt Creator did not auto detect an Android kit. In fact, I have uninstalled and reinstalled Qt numerous times to see if it would detect an Android kit. However, since this still did not work, I manually created my own kit. Here is a screenshot of what I filled out for it:
However, as you can see on the Qt version section, "Qt 5.15.0 for Android" is considered invalid. I have installed previous versions and the current version of Android numerous times on the Qt maintenance tool but all of them show as invalid. As a result, I changed the Qt version to "5.15.0 MinGW 32-bit".
When I tried to run the program, I got an error about not finding the gradle scripts. After researching, I found that since my Android SDK is past version 26.0.0, it is not downloaded with the SDK but should have been downloaded when I installed Qt. Since it clearly was not, and downgraded my version of Android SDK tools to one with the gradle scripts. There is still a green checkmark after it, so it was the correct SDK.
When I tried to run again, my Qt Creator crashes (meaning my laptop exits from Qt Creator immediately). As a result, I only try to build it. When I built it, I get the error that "Android deploy settings file not found, not building an APK. ". I tried researching the problem on the Qt forums and stack overflow but I could not find a valid solution. I continued to experiment more to get to the bottom of my problem.
Additionally, even before I run or do anything, when I start Qt, I get the following errors in general messages:
There are only 3 errors which seem to be repeated every couple of minutes. I have no idea what the some of the errors mean, but for the first one, I created a Android_NDK_ROOT environment variable, in the build settings for the project, Qt environment settings(tools->External->Configure->Environment->External Tools->Update Translations), and my Windows Environment variable settings and wrote "ANDROID_NDK_ROOT = ANDROID_NDK_ROOT=C:\Users\arjun\AppData\Local\Android\Sdk\ndk\21.3.6528147". However, even after all if this, my program still gave the same errors. Additionally, I could not figure out what the other two errors meant and choose to ignore them.
After this, I completely deleted my Qt Creator, and all the things I downloaded along with Qt. I then downloaded Qt. It basically did not change anything, except when I run it, I get a completely different error.
Here is the current state of errors and settings my Qt is in:
My Kits:
My Qt versions:
My manually created android kit:
Current compile output error:
Current Android settings:
Current general messages:
These are some file errors I have been getting randomly on Qt, usually when I try to run something. For the most part, I have been ignoring them and but they might be relevant to my problem. These come back to back, usually more at a time:
Issues I get when building:
In conclusion, my Qt is being difficult and I cannot seem to figure out how to run Android. I have followed all your instructions on the video as well as a lot more but I still cannot figure it out. Can you please help me fix the problem so that I can run Qt Applications on virtual android devices?
Thank You so much for your time and effort!

Strange Xamarin Forms Build Error for Android Project

I have seen a few questions about this error here on SO, but none pertaining to Xamarin Forms and VS2017, so this is not a duplicate.
I have a simple little project that demonstrates the rare use of constructors in XAML. I am getting the following build error:
Error: No resource found that matches the given name: attr
'android:keyboardNavigationCluster'
The error occurs in the file <project-name>/C, and my code contains zero references to this resource.
I am using a totally fresh re-install of VS2017, only now upgraded to v15.5.1, and have done nothing except delete an emulator left over from my previous installation that was not starting. I'm currently using the default Android_Accelerated_x86_Nougat (Android 7.1 API 25) emulator that was installed as part of the VS2017 install. I have made zero configuration changes in VS yet, this is straight 'out the box'.
The Xamarin Diagnostics 'mode' in the Output Window is empty, as no attempt has yet been made to deploy the app, because it won't build.
What can I look at and do about this?
I recreated the project from scratch in my new install of VS and now everything seems to work fine.

Lime 5.2.1 / Android 4.3 : dlopen fails on stpcpy

I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.

Android Studio reports "Could not identify launch activity: Default Activity not found" when building Kotlin projects

I'm trying to build an Android app using Kotlin and Anko. When I select "Run" in Android Studio I get the error:
Could not identify launch activity: Default Activity not found
Error while Launching activity
and the app does not start. I get this error with both the emulator and with a real phone.
To try and narrow down the problem I tried a couple of sample Anko projects, including android-anko-sample, and they all exhibit this same broken behavior.
I have other Android projects I've written in Java, and they run without this problem, which suggests that this is somehow a Kotlin or Anko specific issue. I can even switch back and forth between one of my Java apps and the "android-anko-sample" app linked above, and reproduce the problem with android-anko-sample consistently, while my Java app works correctly every time.
I have looked at other questions involving this error message, and the solutions posted were either not applicable or didn't help.
One thing I have noticed that's weird is that when I open AndroidManifest.xml (of any of these Anko apps) in Android Studio the names of the activities are shown in red, as if they are errors. Here's how the one from android-anko-sample looks:
Note that the app does get installed on the phone/emulator, and I can tap on the icon and run it. It just won't automatically start when I select run from Android Studio, which is pretty inconvenient.
How do I fix this issue?
I'm using:
Android Studio 2.1.2
Ubuntu Linux 16.04
Oracle JDK 1.8.0_131-b11
Code is here:
https://github.com/vsouhrada/android-anko-sample
The complete contents of a few of Android Studio's panes are available in this gist:
https://gist.github.com/xenomachina/e8027b385661038c3f020a543493eebf
This was caused by not having the Kotlin plugin installed in Android Studio.
To fix, go to File → Settings → Plugins → Browse Repositories, find "Kotlin", and install it.

Cannot load the app in titanium android emulator

I am having this problem while running my application in emulator.When I run application it shows in console this error:
[ERROR]Error reading data file
and then nothing happens.Don't know what can be the issue, tried it many ways deleting all virtual AVDs and cleaning up the project again and again but not working anyway any solution for that? I am using 2.1.1 titanium SDK and android V8 (2.2).
sometime this also show this error in console:
[ERROR]No building apps, No launcher activity.
Did the application run before?
Have you tried a clean build or deleting the build directory to perform a full rebuild? You can also have a look into the logcat provided by DDMS to search helpful information.

Categories

Resources