I am trying to install the application as a release APK in my android device but it is crashing when the installation of the application starts. When I run the app on release mode directly from the visual studio, it is showing no error and worked perfectly.
When the same signed APK file I am trying to install in the same or some other android device it just crashed when the installation of the application starts.
The linking property of the Android project is set to None (tried with all the three options), the minimum Android version is jelly bean and maximum version is Oreo 8.1.
I am using the latest Xamarin.Forms package and visual studio 2017. My Android SDK is updated. Please let me know what corrections do I need to make in order to successfully run the APK on all the devices.
I think these are possible things which can help you
Remove the old build from mobile and restart the mobile. while releasing, delete bin and obj folders, clean the solution and rebuild the solution after rebuilding deploy the solution
In android manifest file Set target android version to (api 27) oreo instead Use Compile using SDK.
Check the permission in release mode like (Internet, wifi and other permission which your app needs).
Related
I get this error when trying to launch xamarin emulator from visual studio 2017 device manager. I have downloaded image file tried resetting but nothing seems to work.
I have encounted similar problems, and my solutin are:
1)check the Complile Android version,Minimum Android version,Target Android version and the OS for your divice(You can get this by opening ADM and editing the device). Please sure you have intalled the SDK for the compiling version, target version and the device OS by Android ADK Manager.
2) If you have correctly installed the needed ADK and still get the problem, you can install the app on your phone and run the project again.
The APK is created once I tried to install the APK on the mobile devices it installs but it doesn't open in the android 6.0 and in the android 5.1 doesnt even install.
The Devices OS are
Android 5.1 -API 22
Android 6.0 - API 23
MY test device are
Android 5.1 using xamarin live player
Android Emulator 6.0
both of them works fine but when I have created the APK it doesn't even work.
This is the build information
I have also adjusted the target framework to 8.0 and 8.1 but still it doesn't work.
Output
Build Output
There must be two .APK files in your bin folder.
projectname.Droid.Apk
projectname.Droid-Signed.Apk
Use Signed one to run it on Device.
I installed nativescript from https://docs.nativescript.org/start/quick-setup page, and when I checked tns doctor I get this error:
I could search for the errors and probably learn a thing or two about the errors, but what I don't understand is why the installer itself didn't install Android SDK 22, or the other issues. I gave it full permission and it installed the sdk and other everything.
You need to android sdk 23 AND the sdk of your choice (ie 25). I would recommend using the installer instead of the cmd install line as it is a lot easier to use, which can be found here. If you use the installer, it installs the versions you need and changes the environment variables for you as well as the other parts it needs.
EDIT
Another thing to mention is that even though the installer changes the paths for you and installs the sdks, you still need to make your own emulator image. It's not hard to setup but unfortunately the nativescript installer doesnt do that for you
First up, install Android Studio
https://developer.android.com/studio
Install android API level 25 (Nougat), from the SDK Manager.
Also, setup a virtual device, if you want to run apps on emulator.
That should setup all necessary environment variables for building Android apps with nativescript.
According to the result of tns doctor, you have to install Android SDK.
You can simply install Andriod Studio. Start up Android studio, and use the built-in SDK manager to install required SDK, choose the correct version(>=23 <= 26) which was indicated in the result of tns doctor.
Alternatively, you can install Android SDK standalone, download it from Android developer site and extract files in your system, then follow the instruction of tns doctor, go to Android SDK folder, and find sdkmanager, and start up it to install required SDK with correct version.
Set ANDROID_HOME environment variable, the location points to the Android SDK folder, eg. E:\Users\hantsy\AppData\Local\Android\Sdk
Finally, try to run tns doctor again to check if all conditions are satisfied.
You can run the packaged Android app in one of the following:
Android SDK built-in simulator
A real Android mobile device
Genymotion Android simulator, more productive than SDK built-in one
I have pulled an Appcelerator project from our developer group and unable to publish or run the project on a local Android device.
When trying to publish the below error screen immediately pops up.
Android SDK version 4.1.2 not found.
I have checked both in the Appcelerator platform settings and Android Studio config and have the SDK installed.The install SDK screen in Appcelerator Tried uninstalling/reinstalling Appcli and the SDK to no avail.
After a few days of searching all the appecelerator files in my project. I finally found the fix for my problem (for anyone googling this).
There's a hidden file in the root of the Appcli project called .settings
Inside of settings there's a package called com.appcelerator.titanium.android.core.prefs
There is an android/sdk_version=4.1.2 that was causing all my issues. Hope that helps someone.
Most likely, your issue seems to be with unsupported Android SDK version as per Ti SDK you are using.
So before doing anything, try to grab what this page says to know all about software compatibilities: Titanium Comptability Matrix
It says that minimum Android version as of latest Ti SDK 6.x.x is API 16.
Now, follow these steps carefully to get a fresh start on your system.
First of all, download Android latest SDK from here: Android SDK
Unzip it & put it in at some simple path like in /Users/username/android-sdk
Download Appcelerator Studio (AS) & install it. It will download all pre-requisites like Java, Python
Open Appcelerator Studio & go to Preferences->Studio->Platforms->Android. Select the path of android sdk you unzipped in step 2.
After all these steps, you can open Android SDK Manager (see screenshot where it is) & install necessary SDK, Tools, etc.
Note: I do not suggest to download SDKs via AS as I have faced path issues in beginning.
Even if these steps do not help you, then provide us the log output after running this command on terminal: appc info
If terminal says this command is not found, then you need to go through the AS installation properly.
I had the same issue. Simply deleting all " Android Play Store Distribution" configurations solved my problem.
I've installed Xamarin and tried in Visual Studio to start with a small app and test the web view with this. So for this, I've installed the JDK, the Android SDK and Android NDK on my computer. I'm working throught a tutorial for a web view and I have the problem, when I run the Main.axml, it shows me the error, that my Android SDK could not be found (look at the first attachement). When I check my location paths for the JDK, SDK and NDK, it shows me the correct path and a green tick, so the path and files are correct (look at the second attachement). But my app don't recognize it. What's the problem here? I found some threads on stackoverflow for the same problem, but nothing helped me.
1. Attachement
2. Attachement
OS: Windows 8.1
IDE: MS Visual Studio 14.0.23
Xamarin: 4.2.0
EDIT:
I also tried to open my Android SDK Manager, but this one is disabled in my visual studio. I've installed Xamarin, so it should work:
Any ideas? Thanks.
I tried so many things and finally I have the solution for my problem:
Possible reason for the problem: I just installed the Xamarin, which installes also the JDK, Android SKD and Android NDK in it's wizzard, so I thought this should be the correct versions. After installing Xamarin, I opened my Visual Studio and checked the paths (Tool - Options - Xamarin - Android seetings) for my JDK, SDK and NDK. The paths show on the versions, which were installed by Xamarin. My Android SDK Manager was disabled.
Solution: Then I uninstall everything - the JDK, SDK and NDK and also the whole Xamarin and my old Android Studio. After that, I decided to install the newest JDK from the Java website, the newes Android SDK/NDK from the Android Studio website and a plane xamarin without the sdk/jdk installation. So I could be sure, that I have the correct versions. After the installation, I again opened Visual Studio - Tool - Options - Android seetings and set the paths to the new versions. Than I checked my Android SDK Manager and it was finally enabled and so I installed also the newest Android SDK Tools. After that I cleaned and builded my solution, start it and my android emulator opens my webview page. So I think, the best way is to install the required programms from their website and not automaticlly with xamarin. Now it works. Cheers.