-
Notifications
You must be signed in to change notification settings - Fork 0
Android
mitochondrion edited this page Dec 12, 2016
·
16 revisions
##Manually install apk
~/Library/Android/sdk/platform-tools/adbadb install [path to .apk]
##Manually launch emulator
~/Library/Android/sdk/tools/emulator -avd Nexus_6_API_23 -netspeed full -netdelay none -http-proxy http://127.0.0.1:8888 -port 5554
##Push to JCenter
###Setup
Create local.properties at top level:
sdk.dir=/Users/alex/Library/Android/sdk
bintray.user=username
bintray.apikey=apikey
bintray.gpg.password=password
JCenter repo:
https://bintray.com/[user]/maven/[repo name]
###Push:
- For details see: https://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
- Bump
libraryVersion# inAndroidSDK/[app name]/build.gradle ./gradlew install- Look for
BUILD SUCCESSFUL ./gradlew bintrayUpload- Look for
BUILD SUCCESSFUL - Run with
--debugif anything goes wrong - Check the JCenter repo to make sure the upload worked.
###Test: Install the new version of the library from JCenter in a new app and test that Gradle can sync and that everything works.
- Make sure the JCenter repo is configured in the new project's
build.gradle:
allprojects {
repositories {
...
maven {
...
url 'https://dl.bintray.com/[username]/maven/'
}
}
}
- Make sure the package is configured in the new project's
app/build.gradle:
dependencies {
...
compile '[package]:[artifact]:[version, e.g. 0.1.2]'
}
##Clean gradle cache
rm -rf ~/.gradle/cachesrm -rf [ProjectRoot]/.gradle[ProjectRoot]/gradlew assemble
##Fixing Logcat in Android Studio
- Restart logcat (button on sidebar of Android Studio debugger panel)
- Change the log level to Debug (or anything else) and back to Verbose.
- Unplugging and plugging back in the device
- Running
adb kill-server && adb start-server - Close Android Studio and launch
ddmson the command line. - Restart Android Studio