哪位有大锯哥单编apk视频里的demo网盘地址呀,我自己写的demo版本高,单编不兼容5.1,编译失败过不去了
packages/apps/SobLogDemo/app/src/main/res/layout/activity_main.xml:9: error: No resource identifier found for attribute 'layout_constraintStart_toStartOf' in package 'com.example.logutilsdemo'
已经解决
新版本不适配老版本的规则需要4处改动
1AndroidManifestt.xml添加包名package="com.example.logutilsdemo"
2主题更改parent="@android:style/Theme.Material.Settings”
3删除新版本属性
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:roundIcon="@mipmap/ic_launcher_round"
4activity_main.xml更改约束布局为RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/helloworld"
android:layout_centerInParent="true"
/>
</RelativeLayout>
因为5.1的时候还没有约束布局,所以直接内置apk比较方便。
属性呀,这你么编译实际上要声明的,你直接学后面的吧,后面直接把apk预编译进去。