gpt4 book ai didi

java - 棘手的 Android 登录屏幕

转载 作者:行者123 更新时间:2023-12-01 16:57:59 25 4
gpt4 key购买 nike

我正在开发应用程序的登录屏幕

我严格按照本教程进行操作

http://javapapers.com/android/beautiful-android-login-screen-design-tutorial/(不是因为懒惰而没有复制源代码,只是认为最好添加链接以表彰其他人的辛勤工作)

教程中缺少一些权限,我添加了这些权限,但没有效果

我还将我的 Api 从 15 增加到 16,但这也不起作用

我收到以下错误

05-11 19:23:21.240  28766-28766/? E/dalvikvm﹕ >>>>> com.example.alex.jsonparsegridview [ userId:0 | appId:10263 ]
05-11 19:23:21.490 28766-28792/com.example.alex.jsonparsegridview E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
Process: com.example.alex.jsonparsegridview, PID: 28766
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.SecurityException: Neither user 10263 nor current process has android.permission.READ_PROFILE.
at android.os.Parcel.readException(Parcel.java:1465)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:413)
at android.content.ContentResolver.query(ContentResolver.java:477)
at android.content.CursorLoader.loadInBackground(CursorLoader.java:65)
at android.content.CursorLoader.loadInBackground(CursorLoader.java:43)
at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:57)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:841)

最佳答案

你失踪了READ_PROFILE权限

关于java - 棘手的 Android 登录屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30175059/

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