android-manifest

Unable to find explicit activity class {}; have you declared this activity in your AndroidManifest.xml

…衆ロ難τιáo~ 提交于 2020-01-11 09:17:48
问题 I'm trying unzip some files in background, so I use IntentService like in google's tutorial. My service class declared in AndroidManifest like this: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.osmdroid"> <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" /> <application android:configChanges="orientation|screenSize|keyboardHidden" android:hardwareAccelerated="true" android:icon="@drawable/ecn_icon" android:label="@string/app_name" android

Manifest merger failed after import a module

a 夏天 提交于 2020-01-09 11:44:06
问题 Hi I am developing a sdk, and when I add these SDK into a app proyect I get the following error: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to <application>

R.styleable can not be resolved, why?

与世无争的帅哥 提交于 2020-01-09 07:42:26
问题 I have a resources.xml file located under direcotry values/ , That's /values/resources.xml <?xml version="1.0" encoding="utf-8"?> <resources> <declare-styleable name="TheMissingTabWidget"> <attr name="android:divider" /> </declare-styleable> </resources> In my java code, when I try to access this resource by R.styleable.TheMissingTabWidget , eclipse complain that styleable cannot be resolved or is not a field . Why? Why I can not access this resource? (I am using android 2.1-updated). 回答1:

adb broadcast with user ID

怎甘沉沦 提交于 2020-01-06 20:58:28
问题 I'm trying to broadcast an adb-command to a broadcast-receiver. This would be a very simple task, but the braodcast-receiver has: android:exported="false" On the offical android.developer website, it says: If "false", the only messages the broadcast receiver can receive are those sent by components of the same application or applications with the same user ID. So I'm trying to add the user ID to the broadcast. My approach by now is the following adb command: > adb shell am broadcast -a com

Go back to MainActivity from any activities with Flag

╄→гoц情女王★ 提交于 2020-01-06 17:57:54
问题 I want to go back to MainActivity from any activities. For ex, my stack of activities: A - B - C - D. A (MainActivity) is in the bottom and D is in the top of stack . When I use android:launchMode="singleTask" . I can go back to A at any actvities as I expected. But when I use flag FLAG_ACTIVITY_NEW_TASK (without launchMode="singleTask"), it does not work as expected, it open a new Activity. And stacks are: A - B - C - D - A not as document wrote: FLAG_ACTIVITY_NEW_TASK Start the activity in

Android NDK glReadPixels() from offscreen buffer

谁都会走 提交于 2020-01-06 14:50:15
问题 I'm writing a game using android ndk. I'm using picking to select objects in opengl. For that i have an offscreen framebuffer object where i render into and i use glReadPixels() to get the color from the FBO. The color then encodes the id of the clicked object. The problem is glReadPixels() does not work. It just does not read any color values. Is there anything I have to do, to make it work? GLubyte pixel[4] = {0,0,0,0}; glReadPixels(x, y , 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, (void *)pixel);

missing adactivity with android configchanges

别等时光非礼了梦想. 提交于 2020-01-06 13:55:19
问题 build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.1" defaultConfig { applicationId "com.example.yamkatrader.myapplication" minSdkVersion 9 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' debuggable false } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support

android restricting apk install for small screens

☆樱花仙子☆ 提交于 2020-01-06 12:41:15
问题 How can I restrict my apk to not install on small devices, I know about the support-screens parameter but as I understand correctly , it won't work if user is installing directly from apk. 回答1: I think you can only restrict devices that can see your app in the market. If they have your apk, there's no stopping them. You can however check the resolution on startup, and display an alert or something. 来源: https://stackoverflow.com/questions/8092101/android-restricting-apk-install-for-small

android: use Intent.ACTION_BOOT_COMPLETED or …?

有些话、适合烂在心里 提交于 2020-01-06 09:57:20
问题 In the AndroidManifest file, I want to capture the BOOT_COMPLETED event when the user re-boots their device. I am adding this permission: "uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" I have seen two "intent-filters" used by others on Stackoverflow: "Intent.ACTION_BOOT_COMPLETED" and "android.intent.action.BOOT_COMPLETED" What is the preferred action string here? Please advise and explain. 回答1: Intent.ACTION_BOOT_COMPLETED == android.intent.action.BOOT_COMPLETED

android: use Intent.ACTION_BOOT_COMPLETED or …?

二次信任 提交于 2020-01-06 09:54:27
问题 In the AndroidManifest file, I want to capture the BOOT_COMPLETED event when the user re-boots their device. I am adding this permission: "uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" I have seen two "intent-filters" used by others on Stackoverflow: "Intent.ACTION_BOOT_COMPLETED" and "android.intent.action.BOOT_COMPLETED" What is the preferred action string here? Please advise and explain. 回答1: Intent.ACTION_BOOT_COMPLETED == android.intent.action.BOOT_COMPLETED