Send commands to a specific device with ADB
adb devices
adb -s serial_number command
References
https://developer.android.com/studio/command-line/adb.html
adb devices
adb -s serial_number command
References
https://developer.android.com/studio/command-line/adb.html
Building in Debug Mode
gradlew.bat assembleDebug
Building in Release Mode
gradlew.bat assembleRelease
References
https://developer.android.com/studio/build/building-cmdline.html
Shared Mode
config.xml :
<preference name="xwalkMode" value="shared" />
Multi-APK Mode
<preference name="xwalkMultipleApk" value="false" />
Optional: Java Heap Size
environment variable :
_JAVA_OPTIONS=-Xmx512M
References
https://taco.visualstudio.com/en-us/docs/cordova-crosswalk/
Application level
In your Android manifest file, add the following attribute to the tag to enable hardware acceleration for your entire application:
<application android:hardwareAccelerated="true" ...>
References
https://developer.android.com/guide/topics/graphics/hardware-accel.html
To update Android Plugin for Gradle:
You can find the list of available plugin versions in:
Android Studio\gradle\m2repository\com\android\tools\build\gradle\
directory. In my case I have:
Use the desired version by editing your project build.gradle
file.
Example of build.gradle
:
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0-alpha4'
}
To update Gradle:
In your project directory navigate to \gradle\wrapper\
directory and edit:
gradle-wrapper.properties
file.
Example: To change from version 2.8 to version 2.10
before: distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
after: distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
At the end in Android Studio select: Tools→Android→Sync Project with Gradle files
References
http://stackoverflow.com/questions/17727645/how-to-update-gradle-in-android-studio
Just add
android { .... dexOptions { // Prevent OutOfMemory with MultiDex during the build phase javaMaxHeapSize "4g" } }
in your build.gralde
dexOptions { javaMaxHeapSize "4g" }
References
http://stackoverflow.com/questions/37203884/increasing-the-gradle-heap-size
References
http://bryanlor.com/blog/gradle-tutorial-how-install-gradle-windows
https://www.javacodegeeks.com/2013/04/how-to-install-gradle-2.html
You need to save the APK to a public directory.
For example:
Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDownloads).ToString();
References :
https://forums.xamarin.com/discussion/5272/stuck-on-running-downloaded-apk-there-was-a-problem-parsing-the-package
https://pupli.net/2016/06/19/install-application-programmatically-on-android/
adb kill-server adb start-server
Intent promptInstall = new Intent(Intent.ACTION_VIEW) .setDataAndType(Uri.parse("file:///path/to/your.apk"), "application/vnd.android.package-archive"); startActivity(promptInstall);
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
References :
http://stackoverflow.com/questions/4604239/install-application-programmatically-on-android