Android:exported needs to be explicitly specified for <service ...

文章推薦指數: 80 %
投票人數:10人

The reason is because some of the dependency libraries that you're using have elements which do not have "android:exported" attribute. Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. LearnmoreaboutCollectives Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. LearnmoreaboutTeams Android:exportedneedstobeexplicitlyspecifiedfor.AppstargetingAndroid12andhigher AskQuestion Asked 4monthsago Modified 1monthago Viewed 274times 1 Thereisanerrorandroid:exportedneedstobeexplicitlyspecifiedforservicewhilecompiling gradle-wrapper.properties: distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip AndroidManifest.xml: Ispecifiedandroid:exported=foralltheactivitiesbutstillitisgivingmeanerror. NoerrorswerereportedasanerrorintheJavacodeitself. EDIT: Dependencies/Librariesused: implementationfileTree(dir:'libs',include:['*.jar']) implementation'com.github.AnchorFreePartner.hydra-sdk-android:sdk:3.4.0' implementation'com.github.AnchorFreePartner.hydra-sdk-android:openvpn:3.4.0' implementation'androidx.appcompat:appcompat:1.3.0' implementation'androidx.cardview:cardview:1.0.0' implementation'androidx.recyclerview:recyclerview:1.2.1' implementation'com.google.android.material:material:1.5.0-alpha01' implementation'com.jakewharton:butterknife:10.2.3' implementation'androidx.constraintlayout:constraintlayout:2.0.4' implementation'androidx.legacy:legacy-support-v4:1.0.0' annotationProcessor'com.jakewharton:butterknife-compiler:10.2.3' implementation'androidx.multidex:multidex:2.0.1' //cutomsthings //implementation"com.airbnb.android:lottie:3.6.0" //ad-mobandfacebookmediation implementation'com.google.android.gms:play-services-ads:20.2.0'//19.8.0 implementation'com.google.ads.mediation:facebook:6.5.1.0' //customs implementation'com.github.pepperonas:materialdialog:0.3.4' implementation'pl.bclogic:pulsator4droid:1.0.3' //PreferenceLibrary implementation'com.pixplicity.easyprefs:library:1.9.0' //DrawerLibrary implementation'com.infideap.drawerbehavior:drawer-behavior:1.0.1' //checkBox implementation'net.igenius:customcheckbox:1.3' //CustomToast implementation'com.github.GrenderG:Toasty:1.5.0' } 2]Updatedalldependenciesstillnotworking javaandroidxmlandroid-studio Share Follow editedMay28at9:27 NikolaiRomanovBelliovichksky askedMay28at6:43 NikolaiRomanovBelliovichkskyNikolaiRomanovBelliovichksky 2366bronzebadges 6 Whichalllibrariesareyouusing?Additinthequestion – SambhavKhandelwal May28at9:15 Editedthequestion – NikolaiRomanovBelliovichksky May28at10:32 ChecktheMergedmanifest,youcanfindtheculpritthere.Itislikelyoneofyourdependenciesthatdoesnotsetarequiredexportflag. – SeanBlahovici May28at14:22 Checkeditbutallthingsseemedfinetheretoo.Ievenclearedmygradlecachebutnothingseemstowork – NikolaiRomanovBelliovichksky May28at16:18 Isthereafix? – NikolaiRomanovBelliovichksky May31at15:12  |  Show1morecomment 1Answer 1 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) 1 Thereasonisbecausesomeofthedependencylibrariesthatyou'reusinghaveelementswhichdonothave"android:exported"attribute. Youneedtodothis: Lowertheversioninyourgradleto30andsyncandbuild. GotoyourAndroidManifest.xmlfileandclickon"MergedManifest". FinditemssuchasActivity,Receiver,Service,etcthatdon'thave"android:exported"attribute. ThenaddthemtoyourAndroidManifest.xmlfileinthisway. Nowyoucanincreaseyourversionto31. Ifixeditthatway!Hopeithelpsyou! Share Follow editedAug31at15:35 answeredAug31at15:34 LoopingLooping 2633bronzebadges 0 Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedjavaandroidxmlandroid-studiooraskyourownquestion. TheOverflowBlog Themanystrengthsofneurodivergence MeetSaves:thetooltohelpyouorganizeyourfavoritecontentonStack... FeaturedonMeta BookmarksAreEvolvingIntoSaves RecentColorContrastChangesandAccessibilityUpdates Revieweroverboard!Orarequesttoimprovetheonboardingguidancefornew... CollectivesUpdate:RecognizedMembers,Articles,andGitLab The[placement]tagisbeingburninated ShouldIexplainotherpeople'scode-onlyanswers? Related 23 Android-GoogleMapsAPIv2-NoClassDefFoundError 3 Android+FacebookSDK:"Failedtoauthenticatetheapplicationbecauseofappnamemismatch." 0 AndroidAppcan'tdeploytovirtualdevice 1 HowtomakecallthephoneintentproperlyinKotlin? 231 AndroidStudioerror:"Manifestmergerfailed:AppstargetingAndroid12" 163 android:exportedneedstobeexplicitlyspecifiedfor.AppstargetingAndroid12andhigherarerequiredtospecify 0 android:exportedneedstobeexplicitlyspecifiedfor.AppstargetingAndroid12 HotNetworkQuestions HowtodocolorpostprocessinginWebGL,whenyoucannotreadthecolorofthecurrentpixel? DoesGiftoftheEver-LivingOnesmaximizethedamageand/orhealingfromGlovesofSoulCatching? I'maBritishcitizenandESTAkeepsnotauthorizingmetotraveltotheUnitedStates Cuttheprice"by"or"to"or"in"half? Introductorymaterialonsplines WhereundertheDiscworldarethefourelephantslocated? Aperpetuallynoisyworld HowareHiFiDACsconstructed? Non-drivesidecrankarmrubbingchainstay,canIfileitdown? Howtoexplainquantitycompetitionandpricetaking? CanIbookaflightononepassportandlaterchangeittoanotherpassport? WhendoesR-squaredinmultiplelinearregressionequalsthesumoftheR-squaredfromtwosimplelinearregression? tikz-cdquivercodenotworking Addingbakingpowdertowetinsteadofdrydidn'twork.Whynot? IfEarth'satmosphereistechnicallyvioletbutoureyescan'tseeit,isthereapossiblevariablethatcanletusperceivethat? CanIgetawaywithloweringgravitysothattheusualsolarmassesinouruniversearesimplyplanetarymassesinthesetting'suniverse? WhatinformationshouldIgivetheplayersforthemtodrawtheirmap? Whatdoes"revisionisdueby"mean? IgotaUSPSinsurancechecktodayforapackageIgotyesterday Whydoesn'tlawtakeintoaccountprobability? RepeatValuesInArray Whatkindofputtyshouldbeusedforsealingrimjoistexhaustventholes? Istheexpression"holdthefort"usedincorrectlyhere? DoIhavetodeclarepersonalitemsatCustomsinDublinAirport? morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. default Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?