已經有的項目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要打開的項目。

 

 

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