草庐IT

extra_compile_args

全部标签

Android studio Gradle::dependencies {compile 'com.android.support:appcompat-v7:18.0.0'} 编译失败

最近转用androidstudio做开发。我已使用minsdk、targetsdk创建项目并使用sdk编译为GoogleApiLevel8。由于build.gradle文件中有如下代码导致项目编译失败。dependencies{compile'com.android.support:appcompat-v7:18.0.0'}谁能告诉我为什么会这样?我的整个build.gradle贴在下面。buildscript{repositories{mavenCentral()}dependencies{classpath'com.android.tools.build:gradle:0.5.+'

内部存储器中带有 EXTRA_OUTPUT 的 Android ACTION_IMAGE_CAPTURE

当我打电话时用相机拍照Filefile=newFile(getFilesDir().getAbsolutePath()+"/myImage.jpg");UrioutputFileUri=Uri.fromFile(file);cameraIntent=newIntent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,outputFileUri);相机应用程序上的OK按钮无法正常工作,什么都不做(我猜实际上不会将其保存到内部存储器中,因此应用程序

android - Notification PendingIntent Intent extras 被另一个通知覆盖

使用新的PendingIntent创建新通知时,其Intent中的额外内容会覆盖任何先前通知的PendingIntentIntent额外内容。例如,假设我使用PendingIntent1创建了Notification1,它具有Intent1及其附加功能。当我使用PendingIntent2创建Notification2时,Intent2具有自己的不同额外功能,Intent1现在将具有与Intent2相同的额外功能。为什么会这样?我该如何解决这个问题? 最佳答案 有两种方法可以解决这个问题:一种是在Intent上设置不同的action

android - <sdk>/extras/google/google_play_services/libproject/下缺少 google-play-services_lib

我正在尝试为开发设置Play服务。我想我已经安装了所有必要的包:但是在我的/extras/google/google_play_services/libproject/没有任何东西被命名为google-play-services-lib~/android-sdk-linux/extras/google/google_play_services/libproject$ls-Ra.:...maps.jar(指南中没有指示google-play-services_lib这样的目录http://developer.android.com/google/play-services/setup.h

android - 创建新的 Android 应用程序时没有 "compile with"选项?

创建新的Android应用程序时没有“编译”选项?软件:面向Java开发人员的EclipseIDE版本:IndigoServiceRelease2构建ID:20120216-1857 最佳答案 很多人经常遇到这个问题。解决方法是UpdateADTpluginandthenSDKtoolsandafterwhenyouwilltrytocreateanewproject,theerrorwillnotoccurEclipse-->帮助-->安装新软件-->已经安装了什么?然后,选择“AndroidDDMS、AndoidDevlopme

android - 系统/fcntl.h : no such file while cross compiling pcsclite for Android?

全部:我正在制作一个android应用程序,可以与来自android移动设备的ccid智能卡读卡器通信,我选择了这种方式:“pcsc-lite-1.8.5+ccid-1.4.7+libusb-1.0.3”,它在Ubuntu(PC上的linux操作系统)中运行得很好。然后我尝试将它们移植到android,交叉编译时有很多问题。这些问题大部分是Android的Bionic库缺少一些头文件和函数,例如:sys/fcntl.h,mqueue.h:没有那个文件;pthread_cancel:undefinedreference;现在,当我交叉编译pcsclite以构建可执行文件“pcscd”时,

android - Invalid LOC header Maven compilation error for Android support-v4

我在maven构建我的pom.xml文件时遇到编译失败错误。编译错误为:读取C:\Users\amrit\.m2\repository\com\google\android\support-v4\r6\support-v4-r6.jar时出错;无效的LOCheader(错误的签名)。有谁知道如何解决这个问题?下面是我的pom.xml文件:4.0.0MyListReqMyListReq0.0.1-SNAPSHOTAtosListcom.google.androidandroid4.1.1.4providedcom.google.androidsupport-v4r6srcmaven-co

android - Android Studio 中的 "Failed to get the compiler information for file ..."

我在AndroidStudio中遇到了这个非常奇怪的错误消息。它显示在我通过Gradle使用ndk-build构建的native代码之上。断点和代码单步运行正常,但代码中充斥着“无法解析变量”等“错误”。这是它的外观示例:同样,所有代码都可以正确运行,就像IDE似乎无法解析一大堆类型一样。您可以在右侧看到一连串的错误。基本上每一行都被标记为错误,即使它们都编译得很好。不知道发生了什么! 最佳答案 我相信执行以下操作可以解决问题:手动删除目录build/intermediates/ndkBuild/debug/obj/local运行刷

android - 我们什么时候应该使用 android.arch.lifecycle :compiler (or android. arch.lifecycle :common-java8)?

目前,我们正在项目中使用LiveData、ViewModel和Room。我们正在使用Java8。我们在build.gradle中使用以下内容//ViewModelandLiveDataimplementation"android.arch.lifecycle:extensions:1.1.1"//Room(use1.1.0-beta1forlatestbeta)implementation"android.arch.persistence.room:runtime:1.0.0"annotationProcessor"android.arch.persistence.room:compi

android - 有没有办法使用 ActivityInstrumentationTestCase2 将 Extras 添加到 Activity

我正在使用ActivityInstrumentationTestCase2进行单元测试。有没有办法向Activity添加额外内容,以便当Activity到达这样的一行时Bundleextras=getIntent().getExtras();它会返回额外的东西吗? 最佳答案 您可以调用setActivityIntent在您调用getActivity之前的测试setUp()方法中,更改用于启动被测Activity的Intent。然后,此Intent将成为您Activity中getIntent()返回的Intent。