I am working in RN 0.57.1 and because of stripe latest updates i need to upgrade my stripe package. App is working fine with iOS build but the android build failed regular, I am totally confused here how to fix this.
Here is my build.gradle code:
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
googlePlayServicesAuthVersion = "17.0.0"
}
Here is Error:
Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
/Users/admin/.gradle/caches/transforms-2/files-2.1/847adf56c6204cd8db834c9987a748e4/stripe-3ds2-android-1.2.2/res/values/values.xml:84:5-86:13: AAPT: error: style attribute 'attr/boxBackgroundColor (aka com.mybeautysquad.customer:attr/boxBackgroundColor)' not found.
Please let me know if anyone can help me into this...Thanks!
I solved this on the latest version of RN using a very similar set up as you.
https://github.com/tipsi/tipsi-stripe/issues/504#issuecomment-583566852
Related
i'm currently facing the problem in running my flutter app in physical device(phone). i'm using android studio 4 and vscode. The error message is below.
Launching lib\main.dart on TECNO B1f in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Failed to find target with hash string 'android-29' in: C:\Users\Kitsson\AppData\Local\Android\sdk
* 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 7m 8s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I would suggest 4 methods to solve this issue , try one after another until it works for you :
Open terminal - run flutter doctor --android-licenses. Just accept all and it should work, if it dosen't then skip to next step.
adding buildToolsVersion in android => app => build.gradle
android { compileSdkVersion 29 buildToolsVersion "29.0.0" ... ... }
This often happens when you have something in your dependency that require internet like firebase. Just turn on your internet or wifi .
If none of them works then turn off developer option and turn it on again by pressing build number 7 times, this will revoke all usb debugging autherisation and ask whether to trust your developing machine , press yes and you will be good to go
I have seen this issue on several platforms, anyone knows what is it and how to fix it?
The error message:
AAPT: error: resource android:attr/fontVariationSettings not found.
AAPT: error: resource android:attr/ttcIndex not found.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processReleaseResources'.
Failed to process resources, see aapt output above for details.
build gradle:
android {
compileSdkVersion 27
defaultConfig {
applicationId "app name"
minSdkVersion 16
targetSdkVersion 27
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
}
pubspec:
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_markdown: ^0.2.0
share: ^0.5.3
intl: ">=0.14.0"
shared_preferences: ^0.4.3
rxdart: ^0.19.0
url_launcher: ^4.0.1
In case someone has the same issue, it was a problem in package compatibility, in this case, was the obsolete shared preferences.
I have read the installation guide and setup everything. Payment is working fine with iOS but android is still failed. I have used everything to fix the issue but still facing the same issue.
android/build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 27
supportLibVersion = "28.0.0"
googlePlayServicesAuthVersion = "17.0.0"
}
}
package.json
"react": "16.5.0",
"react-native": "0.57.1",
"tipsi-stripe": "^8.0.0-beta.4",
android/app/build.gradle
implementation 'com.android.support:design:27.1.0'
compile project(':tipsi-stripe')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
Androidmanifest.xml
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" />
But the android build failed everytime and i tried everything to resolve this nothing worked.
Here is my issue:
> Task :tipsi-stripe:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
error: resource style/Theme.MaterialComponents.Light.DarkActionBar (aka com.app.customer:style/Theme.MaterialComponents.Light.DarkActionBar) not found.
error: resource style/Theme.MaterialComponents (aka com.app.customer:style/Theme.MaterialComponents) not found.
error: resource style/Widget.MaterialComponents.Button.TextButton (aka com.app:style/Widget.MaterialComponents.Button.TextButton) not found.
error: resource style/Widget.MaterialComponents.Button (aka com.mybeautysquad.customer:style/Widget.MaterialComponents.Button) not found.
error: resource style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense (aka com.app:style/Widget.MaterialComponents.TextInputLayout.FilledBox.Dense) not found.
/Users/admin/.gradle/caches/transforms-2/files-2.1/6b75366950aa0bad3a0940bb5e9e84dd/res/values/values.xml:87:5-65: AAPT: error: style attribute 'attr/boxBackgroundColor (aka com.app.customer:attr/boxBackgroundColor)' not found.
error: failed linking references.
Please let me know if anyone can help me into this. It's very important to resolve this issue because iOS app is working fine the only android still live with old version.
try changing this
implementation 'com.android.support:design:27.1.0'
to
implementation 'com.android.support:design:28.0.0'
also
targetSdkVersion = 27
change it to
targetSdkVersion = 28
do a clean build and try again.
Let me know if that works.
I am not able to build my Android app. I keep seeing this error:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:484)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:473)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
However, it doesn't tell me which gradle dependencies are causing my build to fail. How do I go about troubleshooting this?
Igor
It seems the only way to solve my dilemma was to enable multidex in my project:
In AndroidManifest.xml:
<application
android:name="android.support.multidex.MultiDexApplication"
In app's build.gradle:
dependencies {
compile 'com.android.support:multidex:1.0.0'
and
defaultConfig {
testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
multiDexEnabled true
I am trying to run a simple JUNIT test for a test class in android studio. Build goes fine. When i try to run the JUNIT test i get the following error
*
Execution failed for task ':app:mockableAndroidJar'.
> java.lang.NullPointerException (no error message)
*
When i dumped the stacktrace i get the following. I am clueless as to why this is happening.
:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mockableAndroidJar'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteAc
tionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTa
skExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecu
tionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskEx
ecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecut
er.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptyS
ourceFilesTaskExecuter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithN
oActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecut
er.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMost
OnceTaskExecuter.java:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:31
0)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(Abst
ractTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(Abst
ractTaskPlanExecutor.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTask
PlanExecutor.java:51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java
:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.ja
va:88)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:3
7)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:14
9)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessB
uildActionExecuter.java:90)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.
java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.
java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.
java:28)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSugges
tingBuildActionExecuter.java:50)
at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSugges
tingBuildActionExecuter.java:27)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:40)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:169)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineAct
ionFactory.java:237)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineAct
ionFactory.java:210)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.jav
a:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.jav
a:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFacto
ry.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFacto
ry.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.lang.NullPointerException
at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source)
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)
at org.objectweb.asm.tree.MethodNode.accept(Unknown Source)
at org.objectweb.asm.tree.ClassNode.accept(Unknown Source)
at com.android.builder.testing.MockableJarGenerator.rewriteClass(MockableJarGenerator.java:134
)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.jav
a:91)
at com.android.build.gradle.internal.tasks.MockableAndroidJarTask.createMockableJar(MockableAn
droidJarTask.groovy:50)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAct
ion.doExecute(AnnotationProcessingTaskFactory.java:226)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAct
ion.execute(AnnotationProcessingTaskFactory.java:219)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAct
ion.execute(AnnotationProcessingTaskFactory.java:208)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:589)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:572)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteAct
ionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteAc
tionsTaskExecuter.java:61)
... 49 more
Test Environment used:
Environment: 1.2.2
SDK Version : API 21
Build tools 22.0.1
Android Plugin version : 1.2.3
Gradle version : 2.5
JDK : 1.7.0_79
Can you please help me out with this? Is there any problem with my setup?
Build Gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.krishnaswamyna.testmathsapplication"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:leanback-v17:22.2.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:2.0.31-beta'
testCompile 'org.robolectric:robolectric:3.0'
}
Jus delete the .gradle file in the project
I also had the same issue since a couple of weeks. I saw a hint about the issue being about the SDK from here.
What worked for me was to simply remove the SDK through the SDK Manager and then reinstalling it. You might also have to clean the project and/or invalidate cashes and restart Android Studio, between removing and reinstalling the SDK.
I had the same problem when i installed the Android Studio 2.0.
Uncheck Enable all test artifacts in:
File-> Settings-> Build, Execution, Deployement->Build Tools ->
Gradle-> Experimental gradle
Info: link
Clean the build and rebuild the app this might work and fix the issue. This gradle errors might come due to some old edited files just do the above said.