开发工具:Android Studio + 安卓SDK
进入安卓后Tools菜单下的sdkmanager可以下载对应版本sdk以及api文档。
安卓四大组件Activity,Service,Content Provider,BroadCast Receiver。
六大布局,LinearLayout,RelativerLayout,TableLayout,FragmentLayout,GridLayout,AbsoluteLayout
工程的app.build配置
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() mavenCentral() maven { url "https://jitpack.io" } } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' classpath 'com.mob.sdk:MobSDK:+' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() maven { url "https://jitpack.io" } } } task clean(type: Delete) { delete rootProject.buildDir }
模块的app.build配置
apply plugin: 'com.android.application' apply plugin: 'com.mob.sdk' android { compileSdkVersion 26 defaultConfig { applicationId "com.svautolife.desaysv" minSdkVersion 16 targetSdkVersion 26 versionCode 22 versionName "sand-1.3.2" // versionName "1.3.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true ndk { abiFilters "armeabi" //, "armeabi-v7a", "arm64-v8a","x86" manifestPlaceholders = [ //信鸽的id和秘钥(沙箱) XG_ACCESS_ID : "2100280861", XG_ACCESS_KEY : "AA8BM3U7Z33G" //信鸽的id和秘钥(生产) // XG_ACCESS_ID : "2100283624", // XG_ACCESS_KEY: "A5LAA8973TGE" ] } } signingConfigs { release { storeFile file(RELEASE_STORE_FILE) keyAlias RELEASE_KEY_ALIAS storePassword RELEASE_STORE_PASSWORD keyPassword RELEASE_KEY_PASSWORD } } buildTypes { release { debuggable false minifyEnabled false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } debug { debuggable true signingConfig signingConfigs.release } } dexOptions { preDexLibraries = false javaMaxHeapSize "4g" } compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8 } } MobSDK { appKey "26300286ab9a2" appSecret "f347ae838b0d0bb3686c9f8c644535e9" ShareSDK { //平台配置信息 devInfo { gui false Wechat { appId "wxe2af3649a2e7e7cf" appSecret "26f2202cd33b03123945344b41522121" } QQ { appId "1106871871" appKey "C2WUuqJgZbBJNFVJ" shareByAppClient true } WechatMoments { appId "wxe2af3649a2e7e7cf" appSecret "26f2202cd33b03123945344b41522121" } QZone { appId "1106871871" appKey "C2WUuqJgZbBJNFVJ" } } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:design:26.1.0' implementation 'com.android.support:support-v4:26.1.0' compile 'com.android.support:recyclerview-v7:26.1.0' //请求框架 compile 'com.squareup.retrofit2:retrofit:2.4.0' compile 'com.squareup.retrofit2:converter-gson:2.3.0' compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0' compile 'com.squareup.okhttp3:logging-interceptor:3.8.0' implementation 'io.reactivex.rxjava2:rxandroid:2.0.2' //log compile 'com.jakewharton.timber:timber:4.1.0' //图片加载 compile 'com.github.bumptech.glide:glide:3.7.0' //dagger2 compile 'com.google.dagger:dagger:2.0.2' annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2' provided 'org.glassfish:javax.annotation:10.0-b28' //解决65k compile 'com.android.support:multidex:1.0.3' //recycler view 显示item 滑动 完整 compile 'com.github.rubensousa:gravitysnaphelper:0.1' //圆形图片 implementation 'de.hdodenhof:circleimageview:2.2.0' //图片选择 依赖 'io.reactivex.rxjava2:rxandroid:2.0.2' compile 'com.github.miguelbcr:RxPaparazzo:0.6.0-2.x' //图片压缩 compile 'id.zelory:compressor:2.1.0' //switch button compile 'com.github.zcweng:switch-button:0.0.3@aar' compile 'com.daimajia.swipelayout:library:1.2.0@aar' //bottom slid top compile 'com.sothree.slidinguppanel:library:3.4.0' //update compile 'com.allenliu.versionchecklib:library:1.7.2' //信鸽jar compile 'com.tencent.xinge:xinge:3.2.3-release' //wup包 compile 'com.tencent.wup:wup:1.0.0.E-release' //mid包 compile 'com.tencent.mid:mid:4.0.6-release' //友盟统计 compile 'com.umeng.sdk:common:1.5.0' compile 'com.umeng.sdk:analytics:7.5.0' }