当我在依赖项中添加到这一行时,implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'它会导致错误
*我的错误*
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:8:5-25:19 to override.
Run Code Online (Sandbox Code Playgroud)
和
implementation 'com.android.support:appcompat-v7:28.0.0'
这条线变成红线
我认为问题是版本原因
我怎样才能避免这种冲突呢?
我已经尝试更改版本并在清单中添加代码
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<usespermissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
Run Code Online (Sandbox Code Playgroud)
但没用
这是我的清单
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.blogapp">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".Activities.LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activities.RegisterActivity" />
<activity android:name=".Activities.PostActivity" …Run Code Online (Sandbox Code Playgroud) 迁移 androidx 后,当我单击按钮时,它会向我显示\n为什么会发生这种情况?
\n\n当我点击按钮打开日历时我想要做什么
\n\n这是我点击按钮时的错误
\n\n java.lang.ClassNotFoundException: Didn\'t find class "com.example.blogapp.whateverString" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.example.blogapp-BjDX\nRun Code Online (Sandbox Code Playgroud)\n\n这是我的 Manifest.xml,其中有任何字符串的形式
\n\n<?xml version="1.0" encoding="utf-8"?>\n<manifest xmlns:android="http://schemas.android.com/apk/res/android"\n xmlns:tools="http://schemas.android.com/tools"\n package="com.example.together">\n <!--\n The ACCESS_COARSE/FINE_LOCATION permissions are not required to use\n Google Maps Android API v2, but you must specify either coarse or fine\n location permissions for the \'MyLocation\' functionality.\n -->\n <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- \xeb\xa7\xb5 \xec\x9d\xb4\xec\x9a\xa9\xed\x95\x98\xea\xb8\xb0 \xec\x9c\x84\xed\x95\xa8 -->\n <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />\n <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- \xeb\x8b\xa4\xec\x9d\x8c \xec\xa7\x80\xeb\x8f\x84 -->\n <uses-permission android:name="android.permission.INTERNET" …Run Code Online (Sandbox Code Playgroud)