已经有的项目run时白屏问题

1.andriod 安装项目出现白屏和黑屏(猜测:版本问题,我做了如下操作导致)
To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.2.0 and Gradle to version 4.6. Release notes  Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads

为了利用最新的功能、改进和安全修复,我们强烈建议您将Android Gradle插件更新到3.2.0版,并将Gradle更新到4.6版。发行说明android plugin 3.2.0及更高版本现在支持构建android app bundle,这是一种新的上传格式,可以推迟apk的生成并登录到兼容的app stores,如google play。使用应用程序包,您不再需要构建、签署和管理多个apk,用户可以获得更小、更优化的下载。

更新之后出现如下问题
Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html


Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html


Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html


Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html


Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

run按钮仍然可以点击,当点完run后,查看发布的项目,就是白屏,所以白屏的原因是版本原因
将Android Gradle插件更新到3.2.0版,并将Gradle更新到4.6版

解决办法:

然后我就删除原来的项目,然后打开andriod studio ,在讲已经有的项目copy到指定目录下,然后在andriod studio中选择open要打开的项目。

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章