-
Notifications
You must be signed in to change notification settings - Fork 0
Android
mitochondrion edited this page Jul 5, 2017
·
16 revisions
android {
...
defaultConfig {
...
consumerProguardFiles 'proguard-rules.pro'
}
}
./gradlew clean assembleDebug
~/Library/Android/sdk/platform-tools/adb
adb install [path to .apk]
~/Library/Android/sdk/tools/emulator -avd Nexus_6_API_23 -netspeed full -netdelay none -http-proxy http://127.0.0.1:8888 -port 5554
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]
- 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
--debug
if anything goes wrong - Check the JCenter repo to make sure the upload worked.
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]'
}
rm -rf ~/.gradle/caches
rm -rf [ProjectRoot]/.gradle
[ProjectRoot]/gradlew assemble
- 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
ddms
on the command line. - Restart Android Studio