我正在尝试为Android构建一个离子应用程序,但是当我运行
时ionic cordova run android
我得到了
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files
尝试运行./gradlew clean让我
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using BuildSessionScopeServices.createFileSnapshotter().
答案 0 :(得分:9)
我有同样的问题,但已经解决了。感谢@notlose在此链接https://github.com/oney/react-native-gcm-android/issues/32
提供的信息 <强>解决方案:强>
只需删除 / android 和 / android / app 中的'build'文件夹
用再次建造
反应原生的 react-native run-android '
'离子cordova运行android '为离子