问题1:You need to use a Theme.AppCompat theme (or descendant) with this activity.

改变activity主题,出现错误为:
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

原因:
从错误提示中提到Theme.AppCompat theme,这是因为我们的activity一定是继承了兼容包中的类,android.support.v7.app.AppCompatActivity
所以就要使用与其配合的AppCompat的theme才行。

解决方案:
1.根据提示来使用AppCompat的theme,如下:

  <activity  
  android:name=".MainActivity"  
  android:theme="@style/Theme.AppCompat.Light.NoActionBar"  
  android:label="@string/app_name" >

覆盖安装出现错误

Package com.test.demo new target SDK 22 doesn't support runtime permissions but the old target SDK 27 does.

原因
新版本apk的target是22而老版本的target是27,让新版本的target为27即可解决

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容