I am trying to build a relase version of a nativescript vue app. I have followed the following instrucitons: https://docs.nativescript.org/tooling/publishing/publishing-android-apps
When I put the resulting apk on my phone it trys to install the app and after a few seconds tells me that app was not installed. A debug apk is working fine. What am I doing wrong here?
You must completely uninstall your debug APK from your device before you can install the release version. If you go to Settings -> Applications (menu may vary depending on your device vendor & android version), you will find your application and you have use the option named uninstall for all users. Then you must be able to install your release version. This is a common problem when you use APKs with different keystore (debug vs release) on same device.
You may also uninstall the app using ADB command.
adb uninstall <package_name>
Change the minimuSdk to 17
AndroidManifest.xml
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="__APILEVEL__" />
app\Android_Resources\Android\app.gradle
defaultConfig {
...
minSdkVersion 17
}
Related
How can I open an existing Flutter project made by Android Studio on Mac-Os to export ipa version of app? Can it be done with Mac-Os version of Android Studio or I have to do it with X-Code? How?
Thanks in Advance
I could finally do that by accomplishing the following steps:
Copy the project into macOs (with X-Code Installed)
Open it by Android Studio (preferably latest version)
Enable Flutter and Dart plugin on Android Studio framework settings
Run command flutter packages get (Connection to Flutter repositories must be available)
Run flutter build ios --release as #Günter Zöchbauer truly commented
Connect iPhone device or simulator and run directly on your device
If some errors printed you may need to verify your developer account settings on X-Code or check Github page of your libraries for possible iOS issues
You can do it in XCode.
Ensure you run flutter build ios --release before you do.
Connection to physical iPhone device is not necessary. Run any sample project in xcode. Start a Simulator. (Only One simulator preferrably).
clone the repository from github into Mac (with X-Code Installed)
open terminal.
cd to your pubspec.yaml
flutter run (it will automatically run flutter pub get)
(It will launch on the already running iOS simulator)
follow steps on flutter.dev to install flutter. Above steps will only work from terminal if flutter doctor(any flutter command) is recognized
I have ionic2 app that already works on (Android & IOS) platforms.
After I have copied the source folder to Win7 and downloaded the requirements
I did
1) ionic cordova platform add windows#6.0.0
2) cordova build windows -- --appx=8.1-phone
I got a .sln file in platform/windows folder and output in platforms/windows/AppPackages folder.
but the output .appx file was too small (3.625 K) just like an empty app with splashscreen (contains cordova icon).
Here is the end of the second command
The cordova requirements
I have solved this issue by creating a new ionic app
ionic start MyIonicProject tutorial
and replaced the src folder and every thing what I need from my app with the current .
and after that
ionic cordova platform add windows#6.0.0
cordova run windows
It works like a charm :)
I tried every thing else and didn't get any result.
To build apps for Windows Universal, download and install Visual Studio 2015 Community Edition. During the installation, Select “Tools for Cross Platform Development” as well as the SDK for Windows Universal Apps.
With everything installed, you’ll be able to add a windows platform from the command line with this command:
ionic cordova platform add windows
By default the build command produces two packages: Windows 8.1 and Windows Phone 8.1, which Ionic does not support. To upgrade Windows package to version 10 the following configuration setting must be added to configuration file (config.xml).
<preference name="windows-target-version" value="10.0" />
I have a problem completing NativeScript installation requirement. I got stuck at number 5 in the installation guide available here.
When i run the command "tns doctor" in the command prompt, i get the error message below:
Cannot find a compatible Android SDK for compilation. To be able to
build for An droid, install Android SDK 22 or later. Run $
%ANDROID_HOME%\tools\android to manage your Android SDK versions.
You need to have the Android SDK Build-tools installed on your system.
You can i nstall any version in the following range: '>=23 <=27'. Run
$ %ANDROID_HOME%\tools\android from your command-line to install
required An droid Build Tools.
You need to have Android SDK 22 or later and the latest Android
Support Reposito ry installed on your system. Run $
%ANDROID_HOME%\tools\android to manage the Android Support Repository.
I have installed the required sdk and i am still getting the same error message and every time i execute this script in the console, it takes like forever to complete:
"%ANDROID_HOME%\tools\bin\sdkmanager" "tools" "platform-tools"
"platforms;android-25" "build-tools;25.0.2"
"extras;android;m2repository" "extras;google;m2repository"
I was just trying to install NavtiveScript, for this I followed the official installation guide available at
http://docs.nativescript.org/angular/start/quick-setup but I am stuck at "Step 3: Install iOS and Android requirements"
When I run the below command in Command Prompt (with administrative privileges)
#powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Everything seems to be installed without any issue. But when I try to verify the installation through command, "tns doctor" I returns below warnings:
D:\>tns doctor
WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.
WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to build your projects for Android and run them in the native emulator.
To be able to build for Android and run apps in the native emulator, verify that you have
installed the latest Android SDK and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.
NOTE: You can develop for iOS only on Mac OS X systems.
To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.
Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
Run $ android to manage your Android SDK versions.
You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=24'.
Run android from your command-line to install required Android Build Tools.
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
Run $ android to manage the Android Support Repository.
Can anyone please guide?
I am using Windows 10, and have Visual Studio 2015 (update 3) and Visual Studio Code installed on my machine.
The command line of installing Android also didn't work for me and gave me the same errors as you. I figured out this by downloading and installing Android Studio. After your installation, you should be able to find the location of the android sdk, which is /Users/myMacUserName/Library/Android/sdk in my situation. And you could select all the needed things through SDK Manager. In the terminal, you then do 'export ANDROID_HOME=/Users/myMacUserName/Library/Android/sdk' instead of the command from NativeScript installtion instruction 'export ANDROID_HOME=/usr/local/opt/android-sdk'. After all these, you should be okay with the Android SDK errors.
https://developer.android.com/studio/index.html
Install the android studio from the above link and then after that run the studio and install the desired android sdk packages from within the studio.
I'm using the latest ionic-box as of 27th April 2015. I've been able to ionic platform add android but getting the following error when ionic build android:
[Error: Please install Android target: "android-22".
Hint: Open the SDK manager by running: /home/vagrant/android-sdk-linux/tools/android
You will require:
1. "SDK Platform" for android-22
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
I've tried updating the sdk with the following command
android update sdk --no-ui
where I get the output of fetching a number of "https://dl-ssl.google.com/android*" File not found. However, if i copy that url and paste it on a browser the file is there.
My vagrant box is now bridged on the network to have direct access to the internet, since NAT was giving me the same errors.
Any help is much appreciated.
Follow these steps.
1) Type android on command line.(Make sure ANDROID_HOME and PATH are set properly)
2) Select API 22 from the populated list.
3) Click install packages.
4) Type android avd on command line.
5) Set API level and other config.
6) Now type ionic build android.
i work around this by changing https to http or vise versa, in options but as a quick fix
for supporting andorid API 21 like #astroanu commented this will help. it will add the support of API 21 in project.
$ cordova platforms remove android
$ cordova platforms add android#3.7.1
I was able to build an android apk by doing the following:
Open up the SDK manager after downloading/installing the android SDK (android studio). AndroidStuido>Appearance&Behavior>System Settings>Android SKD. Alternatively, you can just click on the "SDK Manager" button on the "Welcome to Android Studio" window that appears when you open Android Studio.
Under SDK Platforms, click on Android 5.1.1 - API Level 22 and hit apply to install the package.