简体   繁体   中英

Can't give access internet to my Android App

I'm working on an app for Android, I need to get a flux from a website via GET, but I'm stuck on Android Permissions :

I get this message on my Logcat :

02-14 21:22:03.607: W/ActivityManager(51): Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=***/.*** } from null (pid=-1, uid=-1) requires android.permission.ACCESS_NETWORK_STATE

Whereas in my manifest there are those lines before the <application> :

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>

I don't understand what the problem is.

Where exactly did you put your permission? Did you use the Android Manifest xml editor?

try do perform a clean/build

我遇到了类似的问题-试图直接从我的FreeFoodApp类(扩展应用程序)中做一些事情,在“ onCreate()”方法中,编译器始终返回“不能从空开始...”到LAUNCHER活动,并已解决:)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM