草庐IT

build_exe_options

全部标签

android - 如果仅包含在 build.gradle 中,为什么 Android Studio 无法引用库?

在我的应用程序中,我使用的是Guava库。我仅在我的build.gradle文件中引用了它,如下所示:dependencies{compile'com.google.guava:guava:13.0.1'}我的应用重建并运行良好。但是,当我尝试从Guava库中添加新内容时,编译器会提示找不到该类。例如:当我写importcom.google.common.base.Preconditions在我的新文件中,编译器提示'cannotresolvesymbolcommon'。但是我的旧文件重建得很好。为何如此?我必须搞乱Project|Structure吗?我特别想在build.gradl

android - 启动 SDK 管理器时出错 : "find_java.exe is not compatible with the version of Windows you' re running"

我试图在androidstudio中启动androidsdk管理器,但它向我显示以下错误https://plus.google.com/u/0/113311995935504360295/posts/h5EKzabisQj?pid=6068461235610543378&oid=113311995935504360295CannotlaunchSDKmanagerOutput:ThisversionofC:\PROGRA~1\Android\ANDROI~1\sdk\tools\lib\find_java.exeisnotcompatiblewiththeversionofWindow

android - 使用 Dagger 时将 RestAdapter.build() 和 .create() 方法分开的原因是什么?

过去几个月我一直在使用Dagger/Retrofit,并且看到了为api实现ApiModule类的常见模式。这些ApiModule通常看起来像这样:@Provides@SingletonClientprovideClient(OkHttpClientclient){returnnewOkClient(client);}@Provides@SingletonEndpointprovideEndpoint(){return"release".equalsIgnoreCase(BuildConfig.BUILD_TYPE)?Endpoints.newFixedEndpoint(PRODUCT

android - Build.SERIAL 从 API 26 : Android 8. 0 Oreo 开始被弃用

我刚刚将我的应用程序更新为API26,我正在尝试检索设备的序列号,我发现Build.SERIAL在API26上已被弃用。我应该改用什么? 最佳答案 根据docs使用Build.getSerial().请注意,这需要READ_PHONE_STATE权限。 关于android-Build.SERIAL从API26:Android8.0Oreo开始被弃用,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/qu

android - Android studio 3.2中Build Bundle Option的使用

我想知道Androidstudio3.2中的BuildBundle选项有什么用这是一张图片 最佳答案 什么是AppBundle?AndroidAppBundle是一种新的上传格式,包含您应用的所有已编译代码和资源,但将APK生成和签名推迟到GooglePlay。GooglePlay的新应用服务模型称为DynamicDelivery,然后使用您的appbundle为每个用户的设备配置生成和提供优化的APK,因此他们只下载运行您的应用所需的代码和资源。您不再需要构建、签署和管理多个APK来支持不同的设备,用户获得更小、更优化的下载App

android - 错误 : JSR/RET are not supported with computeFrames option

我遇到了这个错误任务应用执行失败:transformClassesWithInstantRunForDebug'。computeFrames选项不支持JSR/RET我的主要Activity:packagepiestudio.opinion;importandroid.os.Bundle;importandroid.support.design.widget.FloatingActionButton;importandroid.support.design.widget.NavigationView;importandroid.support.design.widget.Snackbar

android - Gradle 同步失败 : failed to find Build Tools revision 21. 1.2

我已经安装了Android5.0sdk21并检查了所有可能的解决方案,但没有一个适用于我的情况。我收到同样的错误Gradle同步失败:找不到构建工具修订版21.1.2有关详细信息,请查阅IDE日志 最佳答案 只需打开SDKManager并安装Build-tools21.1.2。以下是您需要安装的内容: 关于android-Gradle同步失败:failedtofindBuildToolsrevision21.1.2,我们在StackOverflow上找到一个类似的问题:

android - 错误 :Unable to find method 'com. android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;安卓工作室 3

Error:Unabletofindmethod'com.android.build.gradle.api.BaseVariant.getOutputs()Ljava/util/List;'.Possiblecausesforthisunexpectederrorinclude:Gradle'sdependencycachemaybecorrupt(thissometimesoccursafteranetworkconnectiontimeout.)Re-downloaddependenciesandsyncproject(requiresnetwork).ThestateofaGra

android - Intent : default application option not shown

我正在使用Intent让用户选择Android设备上的现有图像。使用以下或类似的代码,createChooserIntent确实显示了用于选择设备上的图像(ASTRO、Gallery等)的多个选项,但没有显示“默认情况下用于此操作”复选框。Intentintent=newIntent();intent.setType("image/jpg");intent.setAction(Intent.ACTION_GET_CONTENT);startActivityForResult(Intent.createChooser(intent,"SelectPicture"),PICK_IMAGE)

Android 更新导致错误 : Error:java. nio.file.AccessDeniedException :/home/path/. android/build-cache.lock

已将AndroidStudio从2.3版更新到3.1Canary。但是Gradle似乎有一个很大的问题。Error:java.nio.file.AccessDeniedException:/home/pathname/.android/build-cache.lock我做了什么:删除了.gradle,本以为可以解决问题,没想到,重建工程后,.gradle又出现了。从系统(SDK、AndroidStudio和剩余项目)中删除了所有与Android相关的东西,并从零开始下载AndroidStudio和所有必需的软件包。仍然是同样的问题。将androidstudio版本从3.1canary更