我正在尝试使用Maven将Crashlytics集成到我们的Android项目中.
当从命令行mvn clean package时,我已经设置了所有必需的插件,并执行并完成了构建.
当运行从命令行构建的应用程序时-一切正常.
从IntelliJ运行应用程序时出现问题.
我认为所有Crashlytics魔术都在执行generate-resources阶段时发生:
<plugin> <groupID>com.crashlytics</groupID> <artifactID>crashlytics-maven</artifactID> <version>1.0.3</version> <executions> <execution> <ID>GenerateResources</ID> <goals> <goal>GenerateResources</goal> </goals> </execution> <execution> <ID>CleanupResources</ID> <goals> <goal>CleanupResources</goal> </goals> </execution> </executions></plugin>
这个插件被添加到我的应用程序pom.xml中:
<build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <groupID>com.crashlytics</groupID> <artifactID>crashlytics-maven</artifactID> <!-- full configuration declared in parent pom.xml --> </plugin> ... other plugins... <plugins></build>
所以-问题是-IntelliJ构建我的APK时如何执行此目标?
应用程序运行时出现错误:
ERROR/AndroIDRuntime(11626): FATAL EXCEPTION: main java.lang.RuntimeException: Unable to create application lt.my.app.MyApplication: com.crashlytics.androID.CrashlyticsMissingDependencyException: Crashlytics dID not find a required runtime dependency. To configure your build environment, visit: http://www.crashlytics.com/API/v1/.../androID/confirm/lt.my.app at androID.app.ActivityThread.handleBindApplication(ActivityThread.java:5085) at androID.app.ActivityThread.access00(ActivityThread.java:162) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1436) at androID.os.Handler.dispatchMessage(Handler.java:99) at androID.os.Looper.loop(Looper.java:158) at androID.app.ActivityThread.main(ActivityThread.java:5777) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:850) at dalvik.system.NativeStart.main(Native Method) Caused by: com.crashlytics.androID.CrashlyticsMissingDependencyException: Crashlytics dID not find a required runtime dependency. To configure your build environment, visit: http://www.crashlytics.com/API/v1/.../androID/confirm/lt.my.app at com.crashlytics.androID.j.a(Sourcefile:37) at com.crashlytics.androID.Crashlytics.a(Sourcefile:770) at com.crashlytics.androID.Crashlytics.start(Sourcefile:157) at com.crashlytics.androID.Crashlytics.start(Sourcefile:135) at lt.my.app.MyApplication.onCreate(MyApplication.java:32) at androID.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) at androID.app.ActivityThread.handleBindApplication(ActivityThread.java:5082)
更新(07-24):
接受的答案应该可以,但是,如果您重新下载并重新安装插件,则可以与本机IntelliJ构建器一起使用.尽管(今天)在Ubuntu计算机上启动IntelliJ时崩溃.
解决方法:
我能够使用它的方法是进入右侧的Maven Projects选项卡,选择Plugins,选择crashlytics,然后在GenerateResources目标上单击鼠标右键,然后选择“ Execute Before Make”
总结以上是内存溢出为你收集整理的使用IntelliJ中的Crashlytics运行Android App全部内容,希望文章能够帮你解决使用IntelliJ中的Crashlytics运行Android App所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)