============
Debug KeyStore
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
ADB
/// demo模板 | |
func stMeRecharge(_ where : String, what: String) { | |
event("stMeRecharge", ["where": where, "what": what]) | |
} | |
/// 主要方法, | |
func event(name: String, args: [String: String?]) { | |
// 此处适配sdk | |
if args.isEmpty { | |
MobClick.event(name) |
package com.xinghui.notificationlistenerservicedemo; | |
import android.app.ActivityManager; | |
import android.app.Service; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.os.IBinder; | |
import android.os.Process; |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
import org.gradle.api.artifacts.ModuleVersionIdentifier | |
import org.gradle.api.artifacts.ResolvedArtifact | |
import org.gradle.internal.component.external.model.DefaultModuleComponentIdentifier | |
import org.gradle.jvm.JvmLibrary | |
import org.gradle.language.base.artifact.SourcesArtifact | |
import org.gradle.language.java.artifact.JavadocArtifact |
class PublishPlugin implements Plugin<Project>{ | |
def mavenName = 'my maven' | |
@Override | |
void apply(Project target) { | |
PublishExtension extension = project.extensions.create('publish', PublishExtension) | |
project.apply([plugin: 'maven']) |
ext { | |
buildToolsVersion = '22.0.1' | |
supportVersion = '22.2.1' | |
userName = 'xuzhengzhou' | |
password = '123' | |
} | |
buildscript{ | |
repositories{ | |
jcenter() |
su//获取root权限 | |
setprop service.adb.tcp.port 5555//设置监听的端口,端口可以自定义,如5554,5555是默认的 | |
stop adbd//关闭adbd | |
start adbd//重新启动adbd |
def outPut = "$buildDir/outputs/apk/" | |
def channel_id = -1000 | |
def buildVariant = '-debug.' | |
task getChannelId << { | |
def manifest = new XmlParser().parse("2.1.1/AndroidManifest.xml") | |
def androidSchemas = new groovy.xml.Namespace("http://schemas.android.com/apk/res/android", 'android') | |
manifest.application.('meta-data').each{ | |
def nodeName = it.attribute(androidSchemas.name) | |
if(nodeName.equals('xinyi_id')) |
203.208.46.200 dl.google.com | |
203.208.46.200 dl.l.google.com | |
203.208.46.200 dl-ssl.google.com | |
127.0.0.1 fonts.googleapis.com | |
127.0.0.1 ajax.googleapis.com |