草庐IT

extras_require

全部标签

android - 通过 intent extras 发送大数据时出现 TransactionTooLargeException

这个问题在这里已经有了答案:WhattodoonTransactionTooLargeException(43个回答)关闭3年前。在我的应用程序中,我通过Intentextra向我的Activity发送数据。在我的具体情况下,我下载了一个JSON文件,将其内容转换为String,并将其作为Intentextra发送到我的Activity。大小约为500kB。我得到一个TransactionTooLargeException。09-2813:40:46.647:E/JavaBinder(441):!!!FAILEDBINDERTRANSACTION!!!09-2813:40:46.647

Android Lint 错误 : Class requires API level 3, 当前最小值为 1

在运行我的Android应用程序时,我经常会收到错误列表,上面写着ClassrequiresAPIlevel3(currentminis1):android.hardware.SensorEventListener我已经搜索过这个问题的正确答案,例如Android工具>清除链接标记,但这并不能解决问题。每隔一段时间,错误列表就会不断出现。它是在我的项目设置中还是我的方法已被弃用?我已经为Android4.4安装了最新的SDK。 最佳答案 在您的manifest文件中,根据您的要求像这样设置sdk..

android - 错误 :compileSdkVersion android-21 requires compiling with JDK 7 - windows

Android工作室-使用android21更新sdk,将java更新为1.7.0。每当我尝试使用androidL(21)进行编译时,它都会抛出此错误并且gradlesync失败。C:\Users\me>java-versionJava版本“1.7.0_71”Java(TM)SE运行时环境(build1.7.0_71-b14)JavaHotSpot(TM)64位服务器VM(构建24.71-b01,混合模式)为mac找到了类似的问题-AndroidStudioneedsJDK7forAndroid-Lmac 最佳答案 您有两个选择,如

android - 将 Activity 放在首位时如何获得新的 Intent extra?

当使用pendingIntent启动Activity并且该Activity已在后台激活时,我无法获得新Intent的额外信息。getIntent返回启动Activity的Intent,但在这种情况下,Android只会将其返回到前面并调用onResume。我希望能够获得新的Extras以更新Activity。我该怎么做? 最佳答案 尝试@OverrideprotectedvoidonNewIntent(Intentintent){//TODOAuto-generatedmethodstubsuper.onNewIntent(inte

android - RecognizerIntent 不工作; "missing extra calling_package"

我在Android2.2上使用RecognizerIntentAPI时遇到问题。当我使用此代码调用API时:Intentintent=newIntent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH);startActivityForResult(intent,REQUEST_CODE_VOICE_SEARCH);看起来应该可以,搜索弹出窗口在设备上显示“未

内部存储器中带有 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 - 无法扩展 ListFragment - "Call requires API level 11"

我正在尝试扩展ListFragment,但我不断收到上述错误。我将android支持库添加到我的项目中。 最佳答案 您的项目/类可能有错误的导入。您可能从API11(android.app.ListFragment)扩展了ListFragment并且您应该从兼容类(android.support.v4.app.ListFragment)扩展ListFragment 关于android-无法扩展ListFragment-"CallrequiresAPIlevel11",我们在StackOv

android - react native : ReferenceError: Can't find variable: require (line 1 in the generated bundle)

我使用以下指南在ReactNative中创建了一个示例应用Reactnativeandroid但是当我运行react-nativerun-android时。我收到以下异常。11-2516:10:35.3261796-1897/com.awesomeE/ReactNative:GotJSException:ReferenceError:Can'tfindvariable:require11-2516:10:35.3271796-1897/com.awesomeE/AndroidRuntime:FATALEXCEPTION:mqt_jsProcess:com.awesome,PID:179

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