- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在为 Unity 编写一个使用 Android 人脸检测的 Android 插件。我有可以与旧版本一起使用的插件
android.media.FaceDetector;
人脸检测器,我想将其更新到新的 Google 视觉 API
出于某种原因,通过简单地添加人脸检测器变量的声明,会导致插件一启动就崩溃。
这是相关代码。
package com.test.camerapreview;
import android.app.Activity;
//import android.content.Context;
//import android.graphics.Bitmap;
//import android.graphics.BitmapFactory;
import android.graphics.PointF;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
//import android.media.FaceDetector;
import android.opengl.GLES11Ext;
import android.opengl.GLES20;
import android.util.Log;
//import android.util.SparseArray;
import android.view.Display;
import android.view.Surface;
//import android.view.SurfaceView;
//import com.google.android.gms.vision.Frame;
import com.google.gson.Gson;
import com.unity3d.player.UnityPlayer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
//import com.google.android.gms.common.ConnectionResult;
//import com.google.android.gms.common.GoogleApiAvailability;
//import com.google.android.gms.vision.CameraSource;
//import com.google.android.gms.vision.MultiProcessor;
//import com.google.android.gms.vision.Tracker;
//import com.google.android.gms.vision.face.Face;
import com.google.android.gms.vision.face.FaceDetector;
public class NativeCamera implements Camera.PreviewCallback, Camera.FaceDetectionListener {
public static NativeCamera instance;
public static String gameObjectTargetName;
private static Activity myActivity;
Camera mCamera;
int camId;
SurfaceTexture texture;
int nativeTexturePointer = -1;
int unrotatedWidth;
int unrotatedHeight;
int rotatedHeight;
int rotatedWidth;
com.google.android.gms.vision.face.FaceDetector faceDetector; // Putting this here makes my app crash.
//
// Call this function first.
//
public static void Setup(String gameObjectName, Activity theActivity){
gameObjectTargetName = gameObjectName;
myActivity = theActivity;
instance = new NativeCamera();
}
// Rest of code snipped out
}
与此源的唯一区别是添加了faceDetector 变量。它没有在任何地方使用。
这是我在 adb logcat 中看到的错误
01-03 14:00:45.798 19649-19787/? W/MDM: InstalledPackageMonitor - <--> getAppVersionForUid(-1) failed to find matching entity
01-03 14:00:46.123 19649-19787/? I/chatty: uid=10117(com.metago.astro) bmv identical 1 line
01-03 14:00:46.141 19649-19787/? W/MDM: InstalledPackageMonitor - <--> getAppVersionForUid(-1) failed to find matching entity
01-03 14:00:46.346 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 49000 mC, weight[0] 1
01-03 14:00:46.346 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 53000 mC, weight[1] -1
01-03 14:00:46.710 19649-19787/? W/MDM: InstalledPackageMonitor - <--> getAppVersionForUid(-1) failed to find matching entity
01-03 14:00:46.770 14771-14784/? I/zygote64: Waiting for a blocking GC ProfileSaver
01-03 14:00:46.792 14771-14784/? I/zygote64: WaitForGcToComplete blocked ProfileSaver on AddRemoveAppImageSpace for 21.469ms
01-03 14:00:47.348 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 49000 mC, weight[0] 1
01-03 14:00:47.348 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 52000 mC, weight[1] -1
01-03 14:00:47.492 2286-2286/? I/WearableService: Wearable Services stopping
01-03 14:00:48.350 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 48000 mC, weight[0] 1
01-03 14:00:48.350 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 52000 mC, weight[1] -1
01-03 14:00:49.352 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 48000 mC, weight[0] 1
01-03 14:00:49.352 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 52000 mC, weight[1] -1
01-03 14:00:49.904 868-2419/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.tvgla.campreview/com.unity3d.player.UnityPlayerActivity bnds=[586,1508][855,1857]} from uid 10032
01-03 14:00:49.908 671-671/? D/QCOM PowerHAL: LAUNCH HINT: ON
01-03 14:00:49.909 1950-1952/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0
01-03 14:00:49.909 658-2267/? I/ACDB-LOADER: ACDB AFE returned = -19
01-03 14:00:49.909 1950-1952/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0]
01-03 14:00:49.909 658-2267/? D/hardware_info: hw_info_append_hw_type : device_name = speaker
01-03 14:00:49.909 658-2267/? D/audio_hw_primary: enable_snd_device: snd_device(2: speaker)
01-03 14:00:49.909 658-2267/? D/audio_route: Apply path: speaker
01-03 14:00:49.909 658-2267/? D/audio_hw_primary: enable_audio_route: usecase(1) apply and update mixer path: low-latency-playback speaker
01-03 14:00:49.909 658-2267/? D/audio_route: Apply path: low-latency-playback speaker
01-03 14:00:49.923 671-671/? D/QCOM PowerHAL: Activity launch hint handled
01-03 14:00:49.948 868-894/? I/ActivityManager: Start proc 14820:com.tvgla.campreview/u0a324 for activity com.tvgla.campreview/com.unity3d.player.UnityPlayerActivity
01-03 14:00:49.948 658-2267/? D/audio_hw_primary: out_write: retry previous failed cal level set
01-03 14:00:49.958 14820-14820/? I/zygote: Late-enabling -Xcheck:jni
01-03 14:00:50.090 14820-14837/? D/OpenGLRenderer: HWUI GL Pipeline
01-03 14:00:50.121 14820-14837/? I/Adreno: QUALCOMM build : 2941438, I916dfac403
Build Date : 10/03/17
OpenGL ES Shader Compiler Version: EV031.21.02.00
Local Branch : O18A
Remote Branch :
Remote Branch :
Reconstruct Branch :
01-03 14:00:50.126 14820-14837/? I/Adreno: PFP: 0x005ff087, ME: 0x005ff063
01-03 14:00:50.132 14820-14837/? I/zygote: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-03 14:00:50.133 14820-14837/? I/OpenGLRenderer: Initialized EGL, version 1.4
01-03 14:00:50.133 14820-14837/? D/OpenGLRenderer: Swap behavior 2
01-03 14:00:50.165 868-918/? I/ActivityManager: Displayed com.tvgla.campreview/com.unity3d.player.UnityPlayerActivity: +225ms
01-03 14:00:50.167 1377-1377/? I/GoogleInputMethod: onFinishInput() : Dummy InputConnection bound
01-03 14:00:50.167 1377-1377/? I/GoogleInputMethod: onStartInput() : Dummy InputConnection bound
01-03 14:00:50.173 671-671/? D/QCOM PowerHAL: LAUNCH HINT: OFF
01-03 14:00:50.192 14820-14836/? I/Unity: SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 3753mb
01-03 14:00:50.192 14820-14836/? I/Unity: SystemInfo ARM big.LITTLE configuration: 2 big (mask: 12), 2 little (mask: 3)
01-03 14:00:50.192 14820-14836/? I/Unity: ApplicationInfo com.tvgla.campreview version 1.0 build 44c1fe70-80a4-4a60-8a18-207b4d37a86f
01-03 14:00:50.195 14836-14836/? W/UnityMain: type=1400 audit(0.0:91697): avc: denied { read } for name="stat" dev="proc" ino=4026532357 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0
01-03 14:00:50.262 14820-14836/? E/Unity: Unable to find AudioPluginMsHRTF
01-03 14:00:50.263 14820-14836/? E/Unity: Unable to find AudioPluginOculusSpatializer
01-03 14:00:50.264 14820-14836/? E/Unity: Unable to find unitygar
01-03 14:00:50.264 14820-14836/? E/Unity: Unable to find libAudioPluginOculusSpatializer
01-03 14:00:50.266 14820-14836/? E/Unity: Unable to find libtango_3d_reconstruction_api
01-03 14:00:50.280 14820-14836/? D/Unity: GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_vertex_half_float GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_compressed_ETC1_RGB8_texture GL_AMD_compressed_ATC_texture GL_KHR_texture_compression_astc_ldr GL_KHR_texture_compression_astc_hdr GL_OES_texture_compression_astc GL_OES_texture_npot GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_OES_texture_3D GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_QCOM_alpha_test GL_OES_depth24 GL_OES_packed_depth_stencil GL_OES_depth_texture GL_OES_depth_texture_cube_map GL_EXT_sRGB GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_sRGB_decode GL_OES_element_index_uint GL_EXT_copy_image GL_EXT_geometry_shader GL_EXT_tessellation_shader GL_OES_texture_stencil8 GL_EXT_shader_io_blocks GL_OES_shader_image_atomic GL_OES_sample_variables GL_EXT_texture_border_clamp GL_EXT_multisampled_render_to_texture GL_EXT_mul
01-03 14:00:50.280 14820-14836/? D/Unity: tisampled_render_to_texture2 GL_OES_shader_multisample_interpolation GL_EXT_texture_cube_map_array GL_EXT_draw_buffers_indexed GL_EXT_gpu_shader5 GL_EXT_robustness GL_EXT_texture_buffer GL_EXT_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_texture_storage_multisample_2d_array GL_OES_sample_shading GL_OES_get_program_binary GL_EXT_debug_label GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent GL_QCOM_tiled_rendering GL_ANDROID_extension_pack_es31a GL_EXT_primitive_bounding_box GL_OES_standard_derivatives GL_OES_vertex_array_object GL_EXT_disjoint_timer_query GL_KHR_debug GL_EXT_YUV_target GL_EXT_sRGB_write_control GL_EXT_texture_norm16 GL_EXT_discard_framebuffer GL_OES_surfaceless_context GL_OVR_multiview GL_OVR_multiview2 GL_EXT_texture_sRGB_R8 GL_KHR_no_error GL_EXT_debug_marker GL_OES_EGL_image_external_essl3 GL_OVR_multiview_multisampled_render_to_texture GL_EXT_buffer_storage GL_EXT_external_buffer GL_EXT_blit_framebuffer_params GL_EXT_clip_cull_distance
01-03 14:00:50.280 14820-14836/? D/Unity: GL_EXT_protected_textures GL_EXT_shader_non_constant_global_initializers GL_QCOM_framebuffer_foveated GL_QCOM_shader_framebuffer_fetch_noncoherent GL_EXT_EGL_image_array GL_NV_shader_noperspective_interpolation
[ 01-03 14:00:50.316 14820:14836 D/ ]
PlayerBase::PlayerBase()
[ 01-03 14:00:50.317 14820:14836 D/ ]
TrackPlayerBase::TrackPlayerBase()
01-03 14:00:50.317 14820-14836/? I/libOpenSLES: Emulating old channel mask behavior (ignoring positional mask 0x3, using default mask 0x3 based on channel count of 2)
01-03 14:00:50.317 14820-14836/? W/AudioTrack: notificationFrames=-10 clamped to the range -1 to -8
01-03 14:00:50.319 14820-14836/? I/AudioTrack: AUDIO_OUTPUT_FLAG_FAST successful; frameCount 1536 -> 1536
01-03 14:00:50.319 14820-14836/? D/AudioTrack: Client defaulted notificationFrames to 192 for frameCount 1536
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:23 -- type:android.media.SoundPool -- u/pid:10043/1393 -- state:idle -- attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:15 -- type:android.media.SoundPool -- u/pid:1000/868 -- state:idle -- attr:AudioAttributes: usage=USAGE_ASSISTANCE_SONIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:31 -- type:android.media.SoundPool -- u/pid:1027/2374 -- state:idle -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:2431 -- type:android.media.MediaPlayer -- u/pid:10035/8516 -- state:idle -- attr:AudioAttributes: usage=USAGE_UNKNOWN content=CONTENT_TYPE_UNKNOWN flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:2447 -- type:android.media.MediaPlayer -- u/pid:10043/1393 -- state:stopped -- attr:AudioAttributes: usage=USAGE_NOTIFICATION content=CONTENT_TYPE_SONIFICATION flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager Player: ID:2527 -- type:OpenSL ES AudioPlayer (Buffer Queue) -- u/pid:10324/14820 -- state:started -- attr:AudioAttributes: usage=USAGE_MEDIA content=CONTENT_TYPE_UNKNOWN flags=0x0 tags= bundle=null
01-03 14:00:50.321 1342-1881/? D/Avrcp: AudioManager isPlaying: true
01-03 14:00:50.322 656-656/? W//system/bin/hw/android.hidl.allocator@1.0-service: ashmem_create_region(3840) returning hidl_memory(0x7d5f82b330, 3840)
01-03 14:00:50.323 656-656/? W//system/bin/hw/android.hidl.allocator@1.0-service: ashmem_create_region(3840) returning hidl_memory(0x7d5f82b330, 3840)
01-03 14:00:50.332 658-22045/? E/volume_listener: check_and_set_gain_dep_cal: Failed to set gain dep cal level
01-03 14:00:50.333 1342-1881/? E/Avrcp: play status change 2➡1 mPlayStatusChangedNT: 1
01-03 14:00:50.334 1342-1881/? E/bt_btif: register_notification_rsp: Avrcp device is not connected, handle: 0x0
01-03 14:00:50.334 1342-1881/? D/Avrcp: sendPlayPosNotificationRsp: Not registered or requesting.
01-03 14:00:50.334 1950-1952/? E/ANDR-PERF-OPTSHANDLER: Warning: Resource [2, 0] not supported for core 1. Instead use resource for core 0
01-03 14:00:50.334 658-9407/? I/ACDB-LOADER: ACDB AFE returned = -19
01-03 14:00:50.334 1950-1952/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [2, 2, 0]
01-03 14:00:50.334 658-9407/? D/audio_hw_primary: enable_audio_route: usecase(5) apply and update mixer path: audio-ull-playback speaker
01-03 14:00:50.334 658-9407/? D/audio_route: Apply path: audio-ull-playback speaker
01-03 14:00:50.342 658-9407/? D/audio_hw_primary: out_write: retry previous failed cal level set
01-03 14:00:50.354 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 49000 mC, weight[0] 1
01-03 14:00:50.354 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 54000 mC, weight[1] -1
01-03 14:00:50.383 1543-1543/? D/zz: UtWallpaperService$UtEngine.onVisibilityChanged() false
01-03 14:00:50.386 1543-1543/? D/zz: UtRenderer.onNotVisible()
01-03 14:00:50.504 2331-2331/? I/PBSessionCacheImpl: Deleted sessionId[8605084760413] from persistence.
01-03 14:00:50.533 868-1542/? I/WifiService: getWifiEnabledState uid=10048
01-03 14:00:50.550 2331-2331/? W/SearchService: Abort, client detached.
01-03 14:00:51.356 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 50000 mC, weight[0] 1
01-03 14:00:51.356 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 54000 mC, weight[1] -1
01-03 14:00:52.357 723-830/? I/ThermalEngine: vs_get_temperature: read[0] tsens_tz_sensor15 49000 mC, weight[0] 1
01-03 14:00:52.357 723-830/? I/ThermalEngine: vs_get_temperature: read[1] tsens_tz_sensor0 53000 mC, weight[1] -1
01-03 14:00:52.979 868-894/? W/SensorService: sensor 00000001 already enabled in connection 0x782da33f00 (ignoring)
01-03 14:00:53.116 658-22045/? D/audio_hw_primary: disable_audio_route: usecase(1) reset and update mixer path: low-latency-playback speaker
01-03 14:00:53.154 14820-14836/? E/Unity: AndroidJavaException: java.lang.NoSuchFieldError: no "Ljava/lang/Object;" field "instance" in class "Lcom/test/camerapreview/NativeCamera;" or its superclasses
java.lang.NoSuchFieldError: no "Ljava/lang/Object;" field "instance" in class "Lcom/test/camerapreview/NativeCamera;" or its superclasses
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source:151)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at com.unity3d.player.UnityPlayer$c.run(Unknown Source:20)
at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in <filename unknown>:0
at UnityEngine.AndroidJNISafe.GetStaticFieldID (IntPtr clazz, System.String name, System.String sig) [0x00000] in <filename unknown>:0
at UnityEngine._AndroidJNIHelper.GetFieldID (IntPtr jclass, System.String fieldName, System.String signature, Boolean isStatic) [0x00000] in <filena
它提示在 Unity 调用的设置函数中设置的名为 instance 的变量。没有这个变量,我的插件就可以工作。有了它,它就会崩溃。
我还对我的 build.gradle 文件进行了更改。在这里。
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services-vision:9.4.0+' // I added this line.
provided files('./libs/UnityPlayer.jar')
compile files('libs/gson-2.8.2.jar')
}
android.libraryVariants.all { variant ->
// Task names.
String variantName = "${variant.name.capitalize()}"; // Like 'Debug'
String deployTaskGroup = "plugin";
String deployTaskName = "deploy${variantName}PluginArchive"; // Like 'deployDebugPluginArchive'
String dependencyTaskName = "assemble${variantName}"; // Like 'assembleDebug'
// Source.
String sourceAARFolder = "${buildDir.getPath()}/outputs/aar/";
String sourceAARName = "${project.name}-${variant.name}.aar";
// Target.
String targetAARFolder = "../../../Assets/Plugins/Android"; // Navigate into 'Assets'
String targetAARName = "Native Camera.aar"; // The form you ship your plugin
// Create task.
task(deployTaskName, dependsOn: dependencyTaskName, type: Copy) {
from(sourceAARFolder)
into(targetAARFolder)
include(sourceAARName)
rename(sourceAARName, targetAARName)
}.group = deployTaskGroup;
}
我添加了该行
compile 'com.google.android.gms:play-services-vision:9.4.0+'
更新
我尝试将变量从实例重新命名为 mInstance,但遇到了同样的问题。然后我尝试在函数内创建变量并返回它。现在我有了更直观的错误日志,但我不知道如何修复。
01-03 14:38:32.505 19629-19646/? E/Unity: AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/vision/face/FaceDetector;
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/vision/face/FaceDetector;
at java.lang.reflect.Executable.getMethodReturnTypeInternal(Native Method)
at java.lang.reflect.Method.getReturnType(Method.java:141)
at java.lang.Class.getDeclaredMethods(Class.java:1880)
at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:63)
at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
at com.unity3d.player.UnityPlayer$c$1.handleMessage(Unknown Source:151)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:164)
at com.unity3d.player.UnityPlayer$c.run(Unknown Source:20)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.vision.face.FaceDetector" on path: DexPathList[[zip file "/data/app/com.tvgla.campreview-C0
谢谢约翰·劳瑞
最佳答案
但是,我遇到了同样的问题,这是因为我将带有 Gson 代码的自定义库作为 .aar 包含在 Android 应用程序项目中。并且由于 .aar 文件不会传播依赖项 transitively ,我在应用程序项目中遇到 Gson 类错误,在应用程序项目中导入 gson 解决了问题!
Proguard:如果您使用 proguard 来混淆代码,请确保为 gson 添加正确的规则,可以在 here 中找到。
关于android - java.lang.NoClassDefFoundError : Failed resolution of: Lcom/google/android/gms/vision/face/FaceDetector;,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48085989/
我最近在/ drawable中添加了一些.gifs,以便可以将它们与按钮一起使用。这个工作正常(没有错误)。现在,当我重建/运行我的应用程序时,出现以下错误: Error: Gradle: Execu
Android 中有返回内部存储数据路径的方法吗? 我有 2 部 Android 智能手机(Samsung s2 和 s7 edge),我在其中安装了一个应用程序。我想使用位于这条路径中的 sqlit
这个问题在这里已经有了答案: What's the difference between "?android:" and "@android:" in an android layout xml f
我只想知道 android 开发手机、android 普通手机和 android root 手机之间的实际区别。 我们不能从实体店或除 android marketplace 以外的其他地方购买开发手
自Gradle更新以来,我正在努力使这个项目达到标准。这是一个团队项目,它使用的是android-apt插件。我已经进行了必要的语法更改(编译->实现和apt->注释处理器),但是编译器仍在告诉我存在
我是android和kotlin的新手,所以请原谅要解决的一个非常简单的问题! 我已经使用导航体系结构组件创建了一个基本应用程序,使用了底部的导航栏和三个导航选项。每个导航选项都指向一个专用片段,该片
我目前正在使用 Facebook official SDK for Android . 我现在正在使用高级示例应用程序,但我不知道如何让它获取应用程序墙/流/状态而不是登录的用户。 这可能吗?在那种情
我在下载文件时遇到问题, 我可以在模拟器中下载文件,但无法在手机上使用。我已经定义了上网和写入 SD 卡的权限。 我在服务器上有一个 doc 文件,如果用户单击下载。它下载文件。这在模拟器中工作正常但
这个问题在这里已经有了答案: What is the difference between gravity and layout_gravity in Android? (22 个答案) 关闭 9
任何人都可以告诉我什么是 android 缓存和应用程序缓存,因为当我们谈论缓存清理应用程序时,它的作用是,缓存清理概念是清理应用程序缓存还是像内存管理一样主存储、RAM、缓存是不同的并且据我所知,缓
假设应用程序 Foo 和 Eggs 在同一台 Android 设备上。任一应用程序都可以获取设备上所有应用程序的列表。一个应用程序是否有可能知道另一个应用程序是否已经运行以及运行了多长时间? 最佳答案
我有点困惑,我只看到了从 android 到 pc 或者从 android 到 pc 的例子。我需要制作一个从两部手机 (android) 连接的 android 应用程序进行视频聊天。我在想,我知道
用于使用 Android 以编程方式锁定屏幕。我从 Stackoverflow 之前关于此的问题中得到了一些好主意,并且我做得很好,但是当我运行该代码时,没有异常和错误。而且,屏幕没有锁定。请在这段代
文档说: android:layout_alignParentStart If true, makes the start edge of this view match the start edge
我不知道这两个属性和高度之间的区别。 以一个TextView为例,如果我将它的layout_width设置为wrap_content,并将它的width设置为50 dip,会发生什么情况? 最佳答案
这两个属性有什么关系?如果我有 android:noHistory="true",那么有 android:finishOnTaskLaunch="true" 有什么意义吗? 最佳答案 假设您的应用中有
我是新手,正在尝试理解以下 XML 代码: 查看 developer.android.com 上的文档,它说“starStyle”是 R.attr 中的常量, public static final
在下面的代码中,为什么当我设置时单选按钮的外观会发生变化 android:layout_width="fill_parent" 和 android:width="fill_parent" 我说的是
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
假设我有一个函数 fun myFunction(name:String, email:String){},当我调用这个函数时 myFunction('Ali', 'ali@test.com ') 如何
我是一名优秀的程序员,十分优秀!