我在AndroidManifest.xml中更改versionCode后尝试编译我的应用程序的Android版本时遇到问题。我还发现只有安装了插件cordova-plugin-file-transfer时才编译失败。在我更改platform / android / AndroidManifest.xml中的versionCode(我将值从1更改为2)后安装了插件,我得到了这个错误编译。
:generateDebugSources UP-TO-DATE
:compileDebugJava
/Users/myuser/Desktop/hometube/platforms/android/src/org/apache/cordova/file/LocalFilesystem.java:414: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
^
symbol: variable LOLLIPOP
location: class VERSION_CODES
/Users/myuser/Desktop/hometube/platforms/android/src/org/apache/cordova/file/LocalFilesystem.java:416: error: cannot find symbol
for (File f : context.getExternalMediaDirs()) {
^
symbol: method getExternalMediaDirs()
location: variable context of type Context
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
:compileDebugJava FAILED
FAILURE: Build failed with an exception.
有人可以帮助我吗?
感谢所有