gpt4 book ai didi

android - OSS 许可证插件在启动 OsLicensesMenuActivity 时崩溃

转载 作者:行者123 更新时间:2023-11-29 01:04:12 26 4
gpt4 key购买 nike

每一个!我使用本教程包含了 Android OSS Google APIs for Android OSS licenses .进入我的项目(目标 sdk 版本是 27)。

但是当我启动 OssLicensesMenuActivity 时遇到问题。

我是这样做的:

OssLicensesMenuActivity.setActivityTitle("OSS Licenses Demo");
startActivity(new Intent(getActivity(), OssLicensesMenuActivity.class));

这里是问题:

ResourceType: For resource 0x7f07000a, entry index(10) is beyond type entryCount(4)
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:161)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:762)
Caused by: android.content.res.Resources$NotFoundException: Unable to find resource ID #0x7f07000a
at android.content.res.ResourcesImpl.getResourcePackageName(ResourcesImpl.java:248)
at android.content.res.Resources.getResourcePackageName(Resources.java:2783)
at com.google.android.gms.internal.zzdmw.zza(Unknown Source)
at com.google.android.gms.internal.zzdmw.zzeq(Unknown Source)
at com.google.android.gms.oss.licenses.zzb.loadInBackground(Unknown Source)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:306)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:59)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:47)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:138)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 3 more

此外,我尝试添加 these lines list ,但问题未解决:

<activity android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/Theme.AppCompat.DayNight.DarkActionBar"/>

<activity android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/Theme.AppCompat.DayNight.DarkActionBar"/>

最佳答案

在我将我的项目移至 Android Studio 3.0.1 后(因此 Gradle 已更新至版本 3.0.1),问题得到解决。

关于android - OSS 许可证插件在启动 OsLicensesMenuActivity 时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48688197/

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