Reading build/outputs/logs File from Gradle/Android Studio

流过昼夜 提交于 2019-12-25 06:25:09

问题


I noticed my Android app was requesting to "Prevent phone from sleeping" when users installed it. I know I didn't add in any Wake_Lock but figured one of the 3rd party libraries did.

After some googling, I found that I can find the merged Manifest file in the build/outputs/logs. I found the file and found a Wake_lock but wasn't sure who it was attributed to.

Is it the lines above or below it that say who is requesting the Wake_Lock? Or better put is it being caused by Butterknife or Google Play Services?

Here is the excerpt that I found the Wake_Lock in:

MERGED from [com.android.support:support-v4:23.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.android.support/support-v4/23.3.0/AndroidManifest.xml:20:5-43
MERGED from [com.jakewharton:butterknife:8.0.1] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.jakewharton/butterknife/8.0.1/AndroidManifest.xml:5:5-43
    android:targetSdkVersion
        INJECTED from /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/src/main/AndroidManifest.xml
        INJECTED from /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/src/main/AndroidManifest.xml
    android:minSdkVersion
        INJECTED from /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/src/main/AndroidManifest.xml
        INJECTED from /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/src/main/AndroidManifest.xml
uses-permission#android.permission.WAKE_LOCK
ADDED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67
MERGED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67
MERGED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67
    android:name
        ADDED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:22-65
provider#com.google.android.gms.measurement.AppMeasurementContentProvider

回答1:


uses-permission#android.permission.WAKE_LOCK
ADDED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67
MERGED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67
MERGED from [com.google.android.gms:play-services-measurement:8.3.0] /Users/SamMyxer/jackrabbit/sl_saplingandroidbase/SaplingLearning/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-measurement/8.3.0/AndroidManifest.xml:24:5-67

WAKE_LOCK is being added by your com.google.android.gms:play-services-measurement:8.3.0 dependency.



来源:https://stackoverflow.com/questions/37713031/reading-build-outputs-logs-file-from-gradle-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!