Я пытался использовать Программу на другом компьютере и Android Studio Couldnt Build.
Эта сборка отлично работала в другой Android Studio и была успешно построена, вероятно, это что-то, что я не обновил или что-то в этом роде.
Я не могу найти, где ошибка, если вы можете помочь, я бы оценил ее, ты.
Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.example.usuario.tm"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test:runner:1.1.0-alpha3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha3', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.gms:google-services:4.1.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
testImplementation 'junit:junit:4.12'
}
}
apply plugin: 'com.android.application'
apply plugin: 'maven'
Проект:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.usuario.tm">
<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/Naranja">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Error
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugAndroidTestResources'.
> Android resource linking failed
Output: C:\Users\Juancho\Downloads\TM\app\build\intermediates\merged_manifests\debugAndroidTest\processDebugAndroidTestManifest\merged\AndroidManifest.xml:9: error: attribute 'android:name' in <instrumentation> tag must be a valid Java class name.
Command: C:\Users\Juancho\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\cfcffe7ed65bf8e3d18c451094195793\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Juancho\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\merged_manifests\debugAndroidTest\processDebugAndroidTestManifest\merged\AndroidManifest.xml\
-o\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\processed_res\debugAndroidTest\processDebugAndroidTestResources\out\resources-debugAndroidTest.ap_\
-R\
@C:\Users\Juancho\Downloads\TM\app\build\intermediates\incremental\processDebugAndroidTestResources\resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\Juancho\Downloads\TM\app\build\generated\not_namespaced_r_class_sources\debugAndroidTest\processDebugAndroidTestResources\r\
-0\
apk\
--output-text-symbols\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\symbols\androidTest\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Output: C:\Users\Juancho\Downloads\TM\app\build\intermediates\merged_manifests\debugAndroidTest\processDebugAndroidTestManifest\merged\AndroidManifest.xml:9: AAPT: error: attribute 'android:name' in <instrumentation> tag must be a valid Java class name.
Command: C:\Users\Juancho\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\cfcffe7ed65bf8e3d18c451094195793\aapt2-3.2.1-4818971-windows\aapt2.exe link -I\
C:\Users\Juancho\AppData\Local\Android\Sdk\platforms\android-28\android.jar\
--manifest\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\merged_manifests\debugAndroidTest\processDebugAndroidTestManifest\merged\AndroidManifest.xml\
-o\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\processed_res\debugAndroidTest\processDebugAndroidTestResources\out\resources-debugAndroidTest.ap_\
-R\
@C:\Users\Juancho\Downloads\TM\app\build\intermediates\incremental\processDebugAndroidTestResources\resources-list-for-resources-debugAndroidTest.ap_.txt\
--auto-add-overlay\
--java\
C:\Users\Juancho\Downloads\TM\app\build\generated\not_namespaced_r_class_sources\debugAndroidTest\processDebugAndroidTestResources\r\
-0\
apk\
--output-text-symbols\
C:\Users\Juancho\Downloads\TM\app\build\intermediates\symbols\androidTest\debug\R.txt\
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s