gpt4 book ai didi

java - Android Studio : The application installed from Run 'app' and application installed from build/outputs/apk/debug/app-debug. apk 不同

转载 作者:行者123 更新时间:2023-12-02 09:36:22 25 4
gpt4 key购买 nike

我对 android studio 应用程序还是新手,这是我遇到的问题:

当我在 Android Studio 中通过运行“app”运行应用程序时,所有应用程序功能都可以正常工作,并且我能够在应用程序中运行评级栏和位置 map 。

但是,当尝试通过 app/build/outputs/apk/debug/app-debug.apk 安装它时,除了我的应用程序中的评级栏和位置 map 之外,所有应用程序功能都可以工作。当我点击执行这些功能的按钮后,应用程序崩溃了。为什么它不起作用?

<小时/>

[工作]从 android studio 中的 Run 'app' 运行:

评级和定位按钮截图:

Screenshot displaying both rating and locate button

工作评级功能截图:

Screenshot displaying working rating funciton

定位功能工作截图:

Screenshot displaying working locate funciton

<小时/>

[不工作]从app/build/outputs/apk/debug/app-debug.apk运行:

评级和定位按钮截图:

Screenshot displaying both rating and locate button

点击评级或定位按钮后应用程序崩溃的屏幕截图:

Screenshot app crashes

我尝试过的:

我已经清理了项目/重建了项目/甚至手动删除了构建文件夹来重建项目以生成新的APK。

我还将依赖项更新到了最新版本。

但是,还没有工作。

当尝试从 app/build/outputs/apk/debug/app-debug.apk 安装应用程序时,我希望应用程序中的所有功能都能顺利运行,但它崩溃了。

这是我单击速率按钮时的调试日志:

2019-08-13 18:32:17.760 13713-13713/? I/e.nad.whattoea: Late-enabling -Xcheck:jni
2019-08-13 18:32:17.823 13713-13713/? E/libc: Access denied finding property "persist.vendor.sys.activitylog"
2019-08-13 18:32:17.822 13713-13713/? W/re-initialized>: type=1400 audit(0.0:1239971): avc: denied { read } for name="u:object_r:mtk_amslog_prop:s0" dev="tmpfs" ino=7827 scontext=u:r:untrusted_app:s0:c80,c257,c512,c768 tcontext=u:object_r:mtk_amslog_prop:s0 tclass=file permissive=0
2019-08-13 18:32:17.855 13713-13713/learncode.nad.whattoeat D/VivoTheme: load old package name start
2019-08-13 18:32:17.865 13713-13713/learncode.nad.whattoeat I/e.nad.whattoea: The ClassLoaderContext is a special shared library.
2019-08-13 18:32:18.278 13713-13748/learncode.nad.whattoeat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
2019-08-13 18:32:18.301 13713-13713/learncode.nad.whattoeat D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
2019-08-13 18:32:18.302 13713-13713/learncode.nad.whattoeat I/FirebaseInitProvider: FirebaseApp initialization successful
2019-08-13 18:32:18.302 13713-13750/learncode.nad.whattoeat W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
2019-08-13 18:32:18.309 13713-13750/learncode.nad.whattoeat I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
2019-08-13 18:32:18.309 13713-13750/learncode.nad.whattoeat I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
2019-08-13 18:32:18.314 13713-13713/learncode.nad.whattoeat D/NightModeController: learncode.nad.whattoeat = true
2019-08-13 18:32:18.314 13713-13713/learncode.nad.whattoeat D/NightModeController: disable nightmode package:learncode.nad.whattoeat
2019-08-13 18:32:18.353 13713-13747/learncode.nad.whattoeat I/FA: App measurement is starting up, version: 16250
2019-08-13 18:32:18.353 13713-13747/learncode.nad.whattoeat I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2019-08-13 18:32:18.353 13713-13747/learncode.nad.whattoeat I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app learncode.nad.whattoeat
2019-08-13 18:32:18.353 13713-13747/learncode.nad.whattoeat D/FA: Debug-level message logging enabled
2019-08-13 18:32:18.366 13713-13747/learncode.nad.whattoeat D/OpenSSLLib: OpensslErr:Module:12(177:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:168;Function:ASN1_get_object
2019-08-13 18:32:18.374 13713-13713/learncode.nad.whattoeat I/FtBuild: getRomVersion mRomVer=9.0
2019-08-13 18:32:18.384 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
2019-08-13 18:32:18.385 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
2019-08-13 18:32:18.385 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
2019-08-13 18:32:18.385 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
2019-08-13 18:32:18.385 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
2019-08-13 18:32:18.411 13713-13713/learncode.nad.whattoeat W/Glide: Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
2019-08-13 18:32:18.462 13713-13713/learncode.nad.whattoeat D/VivoPhoneWindow: DEBUG_ALIENSCREEN:getRotation mRotation=0
2019-08-13 18:32:18.463 13713-13713/learncode.nad.whattoeat I/PhoneWindow: initSystemUIColor
2019-08-13 18:32:18.492 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
2019-08-13 18:32:18.494 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
2019-08-13 18:32:18.634 13713-13713/learncode.nad.whattoeat W/e.nad.whattoea: Accessing hidden method Landroid/widget/TextView;->getTextDirectionHeuristic()Landroid/text/TextDirectionHeuristic; (light greylist, linking)
2019-08-13 18:32:18.709 13713-13713/learncode.nad.whattoeat D/OpenGLRenderer: Skia GL Pipeline
2019-08-13 18:32:18.709 13713-13713/learncode.nad.whattoeat I/SurfaceFactory: [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@2e418c9
2019-08-13 18:32:18.716 13713-13747/learncode.nad.whattoeat I/FA: Tag Manager is not found and thus will not be used
2019-08-13 18:32:18.723 13713-13713/learncode.nad.whattoeat D/ViewRootImpl[MainActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
2019-08-13 18:32:18.729 13713-13747/learncode.nad.whattoeat D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-2282275983064218132}]
2019-08-13 18:32:18.750 13713-13713/learncode.nad.whattoeat I/CatcherGestureDetector: DecorView onAttached
2019-08-13 18:32:18.751 13713-13758/learncode.nad.whattoeat D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2019-08-13 18:32:18.756 13713-13758/learncode.nad.whattoeat W/System: ClassLoader referenced unknown path: system/framework/mediatek-cta.jar
2019-08-13 18:32:18.758 13713-13758/learncode.nad.whattoeat I/System.out: e:java.lang.ClassNotFoundException: com.mediatek.cta.CtaHttp
2019-08-13 18:32:18.758 13713-13758/learncode.nad.whattoeat D/Linux: [Posix_connect Debug]Process learncode.nad.whattoeat :443
2019-08-13 18:32:18.802 13713-13713/learncode.nad.whattoeat D/Surface: Surface::allocateBuffers(this=0x7dfb784000)
2019-08-13 18:32:18.811 13713-13757/learncode.nad.whattoeat I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
2019-08-13 18:32:18.811 13713-13757/learncode.nad.whattoeat I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
2019-08-13 18:32:18.811 13713-13757/learncode.nad.whattoeat I/OpenGLRenderer: Initialized EGL, version 1.4
2019-08-13 18:32:18.811 13713-13757/learncode.nad.whattoeat D/OpenGLRenderer: Swap behavior 2
2019-08-13 18:32:18.811 13713-13757/learncode.nad.whattoeat E/OpenGLRenderer: Device claims wide gamut support, cannot find matching config, error = EGL_SUCCESS
2019-08-13 18:32:18.817 13713-13713/learncode.nad.whattoeat E/RecyclerView: No adapter attached; skipping layout
2019-08-13 18:32:18.820 13713-13757/learncode.nad.whattoeat D/Surface: Surface::connect(this=0x7dfb784000,api=1)
2019-08-13 18:32:18.821 13713-13757/learncode.nad.whattoeat D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
2019-08-13 18:32:18.848 13713-13750/learncode.nad.whattoeat D/OpenSSLLib: OpensslErr:Module:12(177:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:168;Function:ASN1_get_object
2019-08-13 18:32:18.969 13713-13757/learncode.nad.whattoeat E/ion: ioctl c0044901 failed with code -1: Invalid argument
2019-08-13 18:32:19.011 13713-13747/learncode.nad.whattoeat D/FA: Connected to remote service
2019-08-13 18:32:19.267 13713-13758/learncode.nad.whattoeat D/OpenSSLLib: OpensslErr:Module:12(177:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:168;Function:ASN1_get_object
2019-08-13 18:32:19.268 13713-13758/learncode.nad.whattoeat D/OpenSSLLib: OpensslErr:Module:12(177:); file:external/boringssl/src/crypto/asn1/asn1_lib.c ;Line:168;Function:ASN1_get_object
2019-08-13 18:32:20.817 13713-13784/learncode.nad.whattoeat D/skia: SkJpegCodec::onGetPixels fEnTdshp 0 fISOSpeedRatings -1!
2019-08-13 18:32:20.834 13713-13784/learncode.nad.whattoeat D/skia: SkJpegCodec::onGetPixels fEnTdshp 0 fISOSpeedRatings -1!
2019-08-13 18:32:20.848 13713-13784/learncode.nad.whattoeat I/chatty: uid=10336(learncode.nad.whattoeat) glide-disk-cach identical 1 line
2019-08-13 18:32:20.863 13713-13784/learncode.nad.whattoeat D/skia: SkJpegCodec::onGetPixels fEnTdshp 0 fISOSpeedRatings -1!
2019-08-13 18:32:20.871 13713-13713/learncode.nad.whattoeat W/Glide: Load failed for with size [453x390]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
2019-08-13 18:32:20.871 13713-13713/learncode.nad.whattoeat W/Glide: Load failed for with size [453x390]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
2019-08-13 18:32:20.876 13713-13784/learncode.nad.whattoeat D/skia: SkJpegCodec::onGetPixels fEnTdshp 0 fISOSpeedRatings -1

过滤错误后的logcat:

2019-08-13 18:36:18.694 13899-13899/? E/libc: Access denied finding property "persist.vendor.sys.activitylog"
2019-08-13 18:36:18.708 13899-13914/? E/e.nad.whattoea: Unable to peek into adb socket due to error. Closing socket.: Connection reset by peer
2019-08-13 18:36:19.731 13899-13950/learncode.nad.whattoeat E/OpenGLRenderer: Device claims wide gamut support, cannot find matching config, error = EGL_SUCCESS
2019-08-13 18:36:19.744 13899-13899/learncode.nad.whattoeat E/RecyclerView: No adapter attached; skipping layout
2019-08-13 18:36:19.889 13899-13950/learncode.nad.whattoeat E/ion: ioctl c0044901 failed with code -1: Invalid argument

最佳答案

基本上这是一个权限问题,有些手机不提供正确/实际的日志。您错过了 AndroidManifest.xml 文件中必须提及的任何权限。

关于java - Android Studio : The application installed from Run 'app' and application installed from build/outputs/apk/debug/app-debug. apk 不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57474860/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com