本文将带您了解关于InstabugforAndroid构建警告的新内容,同时我们还将为您解释androidstudio警告的相关知识,另外,我们还将为您提供关于12BestCustomROMsforA
本文将带您了解关于Instabug for Android构建警告的新内容,同时我们还将为您解释android studio警告的相关知识,另外,我们还将为您提供关于12 Best Custom ROMs for Android You Can Install、Android Debug Database无法浏览Android Room创建的数据库信息、Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...、Android Java 8 使用 Lamda 报错:Execution failed for task :app:transformJackWithJackForDebug - Android?的实用信息。
本文目录一览:- Instabug for Android构建警告(android studio警告)
- 12 Best Custom ROMs for Android You Can Install
- Android Debug Database无法浏览Android Room创建的数据库信息
- Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...
- Android Java 8 使用 Lamda 报错:Execution failed for task :app:transformJackWithJackForDebug - Android?
Instabug for Android构建警告(android studio警告)
在我将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 = 1 def versionMinor = 0 def versionPatch = 0 def versionBuild = 0 // bump for dogfood builds,public betas,etc. ext.verCode = versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild ext.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
解决方法
12 Best Custom ROMs for Android You Can Install
Pixel Experience
LineageOS
Evolution X
Corvus OS
Revenge OS
Havoc-OS
Arrow OS
Bliss ROM
Project Sakura
MSM Extended
crDroid
Paranoid Android
Android Debug Database无法浏览Android Room创建的数据库信息
刚接触Android Room Library这个库,觉得很酷,把CRDU从Android中独立出来,并且提供了一套简易的api接口。
但是这里遇到一个小坑,分享出来,希望大家引以为戒(花了不少时间解决,最后还得是google啊:)。
事件起因是因为想找到一款能够浏览安卓端数据的工具或者插件,找了不少方案,但是满足及时,简易方便特点的就这几个比较突出:
- SQLSout。但是要付费,破解版又不给力,毙掉。
- Android Debug Database。一个库,引入即可。感觉可行,就它了。
因为工程是直接在网上git下来的例子,所以我也没怎么看就直接用了。加入依赖,然后build。打开数据库浏览地址。But,没有数据库信息??!!调试发现数据库根本没有获取到,这又是怎么回事呢。
原来是建立数据库的方法调用错了!
INSTANCE =
Room.inMemoryDatabaseBuilder(context.getApplicationContext(), AppDatabase.class)
.allowMainThreadQueries()
.build();
copy下来的代码是这个,一开始也没有怎么怀疑,直到google了一下发现就是这里的问题。原因是创建方法是直接在内存中建立数据库,并不会生成数据库文件。所以换个方法就好了,像这样:
INSTANCE =
Room.databaseBuilder(context.getApplicationContext(), AppDatabase.class, "AppDatabase_db")
.allowMainThreadQueries()
.build();
然后再用Android Debug Database就可以浏览数据了。这个工具真是Cool!
PS;StackOverflow真是个好地方!
Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...
错误内容:
Error:Execution failed for task '':app:preDebugAndroidTestBuild''.
> Conflict with dependency ''com.android.support:support-annotations'' in project '':app''. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
我们寻找External Libraries中的27.1.1版本,删掉就行了
最后在build.gradle中添加如下代码
androidTestCompile(''com.android.support:support-annotations:26.1.0'') {
force = true
}
Android Java 8 使用 Lamda 报错:Execution failed for task :app:transformJackWithJackForDebug - Android?

Remove jackOption from defaultConfig in build.gradle
Add following lines in Application gradle
dependencies {
classpath ''com.android.tools.build:gradle:2.3.1''
classpath ''me.tatarka:gradle-retrolambda:3.2.3''
}
And add following line in build.gradle as below:
apply plugin: ''me.tatarka.retrolambda''
Hope this will help.
我们今天的关于Instabug for Android构建警告和android studio警告的分享已经告一段落,感谢您的关注,如果您想了解更多关于12 Best Custom ROMs for Android You Can Install、Android Debug Database无法浏览Android Room创建的数据库信息、Android Error:Execution failed for task '':app:preDebugAndroidTestBuild''. > Conflict wi...、Android Java 8 使用 Lamda 报错:Execution failed for task :app:transformJackWithJackForDebug - Android?的相关信息,请在本站查询。
本文标签: