在我将InstaBUG添加到我们的一个项目之前,一切都很棒.从那以后,我们一直在达到circleCI 4GB的限制.最重要的是,将InstaBUG作为依赖项的项目将启动preDex gradle任务,无论如何.要启动新构建,我们使用以下命令:./ gradlew assembleDeBUG -PpreDexEnable = false.
使用InstaBUG的项目在构建期间会收到一些警告,如下所示:
Ignoring InnerClasses attribute for an anonymous inner class
(com.instaBUG.library.b) that doesn’t come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that dID not target the modern .class file format. The recommended
solution is to recompile the class from source,using an up-to-date compiler
and without specifying any “-target” type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
我假设由于为“InstaBUG项目”启动的preDex任务,我们达到了4 GB的限制.
有没有人知道发生了什么?
编辑:gradle文件
root build.gradle
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { jcenter() } dependencIEs { classpath 'com.androID.tools.build:gradle:1.2.3' classpath 'de.hannesstruss:godot:0.2' classpath 'com.github.ben-manes:gradle-versions-plugin:0.11.3' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}apply plugin: 'de.hannesstruss.godot'apply plugin: 'com.github.ben-manes.versions'apply from: 'dependencIEs.gradle'def ciServer = 'CI'def executingOnCI = "true".equals(System.getenv(ciServer))ext { // preDexEnable property will come from the command line when circleCI is building the project. if (project.hasProperty('preDexEnable')) { project.ext.preDexlibs = project.propertIEs['preDexEnable'].equals('true') } else { project.ext.preDexlibs = true // pre dexing should be true by default } buildTime = new Date().format("yyyy-MM-dd'T'HH:mm'Z'",TimeZone.getTimeZone("UTC")) developmentFlavor = { applicationID "${project.ext.appID}.${name}" versionname "${project.ext.vername}-${name}" minSdkVersion 15 buildConfigFIEld "String","API_TYPE","\"${name}\"" resValue "string","tray__authority","${applicationID}.tray" } defaultlibraryFlavorConfig = { targetSdkVersion 22 versionCode project.ext.verCode versionname project.ext.vername multIDexEnabled true buildConfigFIEld "String","GIT_SHA","\"${project.ext.gitSha}\"" buildConfigFIEld "String","BUILD_TIME","\"${buildTime}\"" } defaultFlavorConfig = defaultlibraryFlavorConfig << { applicationID project.ext.appID resValue "string","${applicationID}.tray" } defaultAndroIDConfig = { compileSdkVersion 22 buildToolsversion "22.0.1" compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } dexOptions { javaMaxHeapSize executingOnCI ? "2048m" : "4g" jumboMode true } packagingOptions { exclude 'meta-inf/DEPENDENCIES.txt' exclude 'meta-inf/liCENSE.txt' exclude 'meta-inf/NOTICE.txt' exclude 'meta-inf/NOTICE' exclude 'meta-inf/liCENSE' exclude 'meta-inf/DEPENDENCIES' exclude 'meta-inf/notice.txt' exclude 'meta-inf/license.txt' exclude 'meta-inf/dependencIEs.txt' exclude 'meta-inf/LGPL2.1' exclude 'meta-inf/services/javax.annotation.processing.Processor' } lintoptions { checkReleaseBuilds false // Or,if you prefer,you can continue to check for errors in release builds,// but continue the build even when errors are found: abortOnError false } }}subprojects { repositorIEs { maven { url "http://dl.bintray.com/populov/maven" } jcenter() } project.ext.gitSha = 'git rev-parse --short head'.execute([],project.projectDir).text.trim() project.plugins.whenPluginAdded { plugin -> if ("com.androID.build.gradle.AppPlugin".equals(plugin.class.name)) { project.androID.dexOptions.preDexlibrarIEs = rootProject.ext.preDexlibs } else if ("com.androID.build.gradle.libraryPlugin".equals(plugin.class.name)) { project.androID.dexOptions.preDexlibrarIEs = rootProject.ext.preDexlibs } }}
dependencIEs.gradle
ext { kiosk = [ dependencIEs: { compile project(':common') compile librarIEs.multIDex compile librarIEs.vIEwPagerIndicator compile librarIEs.recyclervIEw compile librarIEs.volley compile librarIEs.instaBUG compile librarIEs.mixpanel compile librarIEs.loadToast compile(librarIEs.crashlytics) { transitive = true; } compile librarIEs.dagger apt librarIEs.daggerCompiler provIDed librarIEs.javaxAnnotations } ]}
信息亭模块build.gradle
buildscript { repositorIEs { maven { url 'https://maven.fabric.io/repo' } jcenter() } dependencIEs { classpath 'com.neenbedankt.gradle.plugins:androID-apt:1.6' classpath 'io.fabric.tools:gradle:1.+' }}repositorIEs { maven { url 'https://maven.fabric.io/public' } maven { url 'http://archiva.instaBUG.com/repository/release' } maven { url "https://jitpack.io" }}apply plugin: 'com.androID.application'apply plugin: 'com.neenbedankt.androID-apt'apply plugin: 'io.fabric'// Manifest version information!def versionMajor = 1def versionMinor = 0def versionPatch = 0def versionBuild = 0 // bump for dogfood builds,public betas,etc.ext.verCode = versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuildext.vername = "${versionMajor}.${versionMinor}.${versionPatch}"ext.appID = 'care.smart.androID.kiosk'androID defaultAndroIDConfig << { defaultConfig defaultFlavorConfig << { minSdkVersion 21 buildConfigFIEld "String","APP_name","\"AndroID-Kiosk\"" } productFlavors { realProduction { buildConfigFIEld "String",'"prod"' }// dev developmentFlavor }}dependencIEs kiosk.dependencIEs解决方法 我对这个问题没有真正的答案.但是preDex任务是由于minSdkVersion 21而创建的.另外,我们不能将自己限制在4GB内存,因此我们不得不将其提升到6GB. 总结
以上是内存溢出为你收集整理的Instabug for Android构建警告全部内容,希望文章能够帮你解决Instabug for Android构建警告所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)