我正在尝试构建应用程序(使用ionic2 cordova)
ionic cordova build android
所以发生错误:
D:\Projects\IPA\IPA004001_Mobile\platforms\android\src\org\apache\cordova\filetransfer\FileTransfer.java:851: error: cannot find symbol
FileUtils filePlugin = (FileUtils) pm.getPlugin("File");
Execution failed for task ':compileArmv7DebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
这些插件我使用:
"cordova-android": "^6.3.0",
"cordova-android-support-gradle-release": "^1.2.0",
"cordova-plugin-crosswalk-webview": "^2.4.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.1.0",
"cordova-plugin-statusbar": "^2.4.1",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.2.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-rating": "^1.2.2",
"ionicons": "3.0.0",
"jquery": "^3.2.1",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
我试图删除 cordova-plugin-file-transfer ,然后构建应用程序,它取得了成功。但我需要这个插件所以我该怎么办。他们似乎与android-cordova有不兼容的插件版本,但我尝试了很多版本都没有成功。
答案 0 :(得分:0)
在platform / android build.gradle中我改变了这个:
com.android.support:support-v4:24.1.1+
到
com.android.support:support-v4:24.1.1"
并在project.properties中 这个:
com.android.support:support-v4:24.1.1+
到
com.android.support:support-v4:24.1.1