如何解决实施许可证验证库后,我的应用程序开始崩溃
我使用 this 答案来设置我的许可证验证库。为了编译我的应用程序而没有错误,我需要添加
import random
def tosscoin():
numbers = int(input("Times to flip coin: "))
recordList = []
heads = 0
tails = 0
for n in range(numbers):
flip = random.randint(0,1)
if flip == 0 :
heads += 1
recordList.append("Heads")
print("Heads",heads)
else:
tails += 1
recordList.append("Tails")
print("Tails",tails)
#print(recordList) #uncomment this if you want to print the list in each iteration
return recordList
print(tosscoin())
在库的 build.gradle 中。但是,当我启动我的应用程序时,它会立即崩溃,即使我删除了 android
{
useLibrary 'org.apache.http.legacy'
}
。使用调试器,我可以到达 abort()
行。也许其他人用 Kotlin 尝试过?我该如何解决这个问题?
编辑:
我注意到我在答案的第 24 步出现错误:checker.checkAccess(licenseCheckerCallback)
。但是我不知道如何在 Kotlin 中解决它。
我的红色堆栈跟踪是:
Service Intent must be explicit: Intent { act=com.android.vending.licensing.ILicensingService }
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。