Здравствуйте, я новичок в Android prorgamming, в настоящее время у меня исчезли некоторые проблемы с Gradle Syn c. Я пробовал много вещей, таких как перестройка / очистка проекта, но, похоже, ничего не помогло.
Вот файл Gradle, который создает проблему Syn c:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.fragment"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-database:19.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.firebase:firebase-client-android:2.5.2'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'me.dm7.barcodescanner:zxing:1.9'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:22.0.0'
implementation 'com.google.code.gson:gson:2.8.6'
}
И вот сообщение об ошибке, которое я получаю, когда я синхронизирую c Gradle:
Failed to parse XML in C:\Users\cbuch\AndroidProjects\FoodGentApp\app\src\main\AndroidManifest.xml
ParseError at [row,col]:[19,13]
Message: expected start or end tag
Affected Modules: <a href="openFile:C:/Users/cbuch/AndroidProjects/FoodGentApp/app/build.gradle">app</a>
И, наконец, мой Манифест:
<?xml version="1.0" encoding="UTF-8"?>
-<manifest android:versionName="0.5" android:versionCode="1" package="com.example.fragment" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:targetSdkVersion="29" android:minSdkVersion="21"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<!-- Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds -->
<!-- <uses-sdk android:minSdkVersion="14"/> -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
-<application android:theme="@style/AppTheme" android:supportsRtl="true" android:label="@string/app_name" android:icon="@drawable/kuehli" android:debuggable="true" android:appComponentFactory="androidx.core.app.CoreComponentFactory" android:allowBackup="true">
-<activity android:name="com.example.foodgent.UserInterface.MainActivity" android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
-<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.example.foodgent.UserInterface.SecondActivity"/>
<activity android:name="com.example.foodgent.UserInterface.AddItem"/>
<activity android:name="com.example.foodgent.UserInterface.AddCooking"/>
<activity android:name="com.example.foodgent.UserInterface.AddShop"/>
<activity android:name="com.example.foodgent.Logic.ScanCodeActivity"/>
<meta-data android:name="preloaded_fonts" android:resource="@array/preloaded_fonts"/>
-<service android:name="com.google.firebase.components.ComponentDiscoveryService" android:exported="false" android:directBootAware="true">
<meta-data android:name="com.google.firebase.components:com.google.firebase.database.DatabaseRegistrar" android:value="com.google.firebase.components.ComponentRegistrar"/>
</service>
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" android:excludeFromRecents="true"/>
<!--Service handling Google Sign-In user revocation. For apps that do not integrate withGoogle Sign-In, this service will never be started. -->
<service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:exported="true" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION"/>
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false"/>
<provider android:name="com.google.firebase.provider.FirebaseInitProvider" android:exported="false" android:initOrder="100" android:authorities="com.example.fragment.firebaseinitprovider"/>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
</application>
</manifest>