当我试图预览API23API时,GridLayout工作得很完美。然而,在以前的API 21上,它是在错误的位置和边距上,或者填充没有帮助。另外,目标API是23,minSDK API是15,当我试图将目标API更改为21时,我有呈现问题(解析文件失败)。如何使应用程序与API 23下的API版本兼容?我真的很感激你能提供的任何帮助。
API 23:
API 21:
发布于 2016-08-23 12:06:53
解决了所有问题:1.在build.gradle (Module: app)中添加到依赖项dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:appcompat-v7:+' compile 'com.android.support:gridlayout-v7:23.1.+' }
中
2.在actvity_main.xml中改为<android.support.v7.widget.GridLayout>
https://stackoverflow.com/questions/39095136
复制