我正在尝试为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().
解决方法:
我有同样的问题,但它已经解决了.感谢来自@notlose的信息,链接https://github.com/oney/react-native-gcm-android/issues/32
解:
只需删除/ android和/ android / app中的’build’文件夹
并再次建立
反应本机的’react-native run-android’
用于离子的’离子cordova运行android’