生成签名的apk时出现此问题:
F:\…\app\src\main\java\com\palletdesign\clipdooni\activity\u videoplay.java
错误:错误:需要字符串类型的资源[resource type]
这是
activity_videoplay.java(此部分代码错误):
position = i.getIntExtra("POSITION", 0);
allArrayVideo = i.getStringArrayExtra("VIDEO_ID");
allArrayVideoCatName = i.getStringArrayExtra("VIDEO_CATNAME");
allArrayVideoCatId = i.getStringArrayExtra("VIDEO_CATID");
allArrayVideourl = i.getStringArrayExtra("VIDEO_URL");
allArrayVideoName = i.getStringArrayExtra("VIDEO_NAME");
allArrayVideoId = i.getStringArrayExtra("VIDEO_CID");
allArrayVideoDuration = i.getStringArrayExtra("VIDEO_DURATION");
allArrayVideoDesc = i.getStringArrayExtra("VIDEO_DISCRIPTION");
allArrayImageUrl = i.getStringArrayExtra("VIDEO_IMAGE_URL");
最佳答案
在build.gradle
文件中添加以下代码:
android {
lintOptions {
disable "ResourceType"
}
}
关于android - 生成签名的apk错误:错误:字符串类型[ResourceType]的预期资源,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40946281/