how to solve No matching client found for package name ' - java

Executing tasks: [clean, :app:assembleDebug] in project D:\Profile\AGAINAGAIN
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:generateDebugBuildConfig
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:javaPreCompileDebug
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:processDebugGoogleServices FAILED
Parsing json file: D:\Profile\AGAINAGAIN\app\google-services.json
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugGoogleServices'.
No matching client found for package name 'com.Dinke.againagain'
Any solution provided ?Please tell me if you know any of the files .
Since I think every cases are unique, I think it is better to provide as much info as I can ?

In the google-services.json change the package name to your package name;
"client": [
{
"client_info": {
"mobilesdk_app_id": "",
"android_client_info": {
"package_name": "com.Dinke.againagain" //here
}
},
You can read more about this here: https://developers.google.com/android/guides/google-services-plugin#processing_the_json_file

Related

Error - When I compile or click to create a project

That Error Msg.
Executing tasks: [clean, :app:assembleDebug] in project /Volumes/Macintosh Database/iFolder Save/Application/Android/Developer/
Task :clean UP-TO-DATE
Task :app:clean
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:generateDebugBuildConfig
Task :app:javaPreCompileDebug
Task :app:mainApkListPersistenceDebug
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:createDebugCompatibleScreenManifests
Task :app:extractDeepLinksDebug
Task :app:processDebugManifest
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Task :app:generateDebugAssets
Task :app:mergeDebugAssets
Task :app:processDebugJavaRes NO-SOURCE
Task :app:checkDebugDuplicateClasses
Task :app:mergeDebugResources
Task :app:processDebugResources
Task :app:compileDebugJavaWithJavac
Task :app:compileDebugSources
Task :app:dexBuilderDebug
Task :app:mergeDebugJavaResource FAILED
Task :app:mergeLibDexDebug
Task :app:mergeExtDexDebug
Task :app:mergeProjectDexDebug
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
com.google.common.base.VerifyException (no error message)
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 2s
21 actionable tasks: 20 executed, 1 up-to-date
//--- I tried all of the suggestions in this text and didn't go away. Try creating a new project and compiling the same message as well. ---//

Android studio:Configure Project in android studio

Executing tasks: [:app:assembleDebug] in project C:\Users\Zebranic\AndroidStudioProjects\Atoz
Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:checkDebugManifest
Task :app:compileDebugAidl NO-SOURCE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:generateDebugBuildConfig
Task :app:mainApkListPersistenceDebug
Task :app:generateDebugResValues
Task :app:generateDebugResources
Task :app:writeDebugApplicationId
Task :app:processDebugGoogleServices
Parsing json file: C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\google-services.json
Task :app:javaPreCompileDebug
Task :app:createDebugCompatibleScreenManifests
Task :app:processDebugManifest
C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\AndroidManifest.xml:24:9-31:50 Warning:
activity#com.google.firebase.auth.internal.FederatedSignInActivity#android:launchMode was tagged at AndroidManifest.xml:24 to replace other declarations but no other declaration present
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Task :app:generateDebugAssets
Task :app:mergeDebugAssets
Task :app:mergeDebugResources
Task :app:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml"}],"original":"C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml: AAPT: error: elements require a sdk version of at least 26.\n ","tool":"AAPT"}
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
C:\Users\Zebranic\AndroidStudioProjects\Atoz\app\src\main\res\drawable\btntrail.xml: AAPT: error: elements require a sdk version of at least 26.
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 12s
14 actionable tasks: 14 executed
AAPT: error: elements require a sdk version of at least 26.\n ","tool":"AAPT"
Try Updating SDK version.
Settings->System Settings->Android SDK->SDK Tools
Check Android SDK Tools 26.1.1
At least v26 is to be installed or higher.

Process 'command '/Applications/Android Studio 3.0.1.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

I came across a problem when i used android studio to import a project.More details below :
```
Error:Execution failed for task ':app:transformClassesWithDexForArmDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
```
And the Gradle console show the following message:
---------
Executing tasks: [:app:assembleArmDebug]
Configuration on demand is an incubating feature.
:app:copyJniLibsArmDebugMainJniLibs UP-TO-DATE
:app:armDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preArmDebugBuild UP-TO-DATE
:app:checkArmDebugManifest
:app:preArmReleaseBuild UP-TO-DATE
:app:prepareCjtLibraryWheelCamera019Library UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72531Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:app:preArmDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:app:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:app:prepareComBlankjUtilcode134Library UP-TO-DATE
:app:prepareComCjjMaterialrefeshlayoutLibrary130Library UP-TO-DATE
:app:prepareComDaimajiaAndroidanimationsLibrary113Library UP-TO-DATE
:app:prepareComDaimajiaEasingLibrary101Library UP-TO-DATE
:app:prepareComDanikulaVideocache264Library UP-TO-DATE
:app:prepareComDevbracketsAndroidExomedia301Library UP-TO-DATE
:app:prepareComEdmodoCropper101Library UP-TO-DATE
:app:prepareComFlycoTablayoutFlycoTabLayout_Lib212Library UP-TO-DATE
:app:prepareComGetbaseFloatingactionbutton1101Library UP-TO-DATE
:app:prepareComGithubChrisbanesPhotoView130Library UP-TO-DATE
:app:prepareComGithubCtiaoDanmakuFlameMaster0912Library UP-TO-DATE
:app:prepareComGithubJmolsmobileLandscapevideocamera107Library UP-TO-DATE
:app:prepareComGithubSatyanSugar15Library UP-TO-DATE
:app:prepareComGoogleAndroidExoplayerExoplayerR159Library UP-TO-DATE
:app:prepareComJaydenxiaoGuider100Library UP-TO-DATE
:app:prepareComJcodecraeerXrecyclerview132Library UP-TO-DATE
:app:prepareComMakeramenRoundedimageview230Library UP-TO-DATE
:app:prepareComMalinskiySuperrecyclerview114Library UP-TO-DATE
:app:prepareComOrhanobutLogger115Library UP-TO-DATE
:app:prepareComPgyersdkSdk254Library UP-TO-DATE
:app:prepareComPingxxPingppAlipay218Library UP-TO-DATE
:app:prepareComPingxxPingppCore218Library UP-TO-DATE
:app:prepareComPingxxPingppWxpay218Library UP-TO-DATE
:app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:app:prepareComScwangSmartrefreshSmartRefreshHeader103Library UP-TO-DATE
:app:prepareComScwangSmartrefreshSmartRefreshLayout103Library UP-TO-DATE
:app:prepareComSerenegiantCommon119Library UP-TO-DATE
:app:prepareComZhyOkhttputils262Library UP-TO-DATE
:app:prepareDeHdodenhofCircleimageview210Library UP-TO-DATE
:app:prepareJpWasabeefGlideTransformations202Library UP-TO-DATE
:app:preparePubDevrelEasypermissions020Library UP-TO-DATE
:app:prepareArmDebugDependencies
:app:compileArmDebugAidl UP-TO-DATE
:app:compileArmDebugRenderscript UP-TO-DATE
:app:generateArmDebugBuildConfig UP-TO-DATE
:app:generateArmDebugAssets UP-TO-DATE
:app:mergeArmDebugAssets UP-TO-DATE
:app:generateArmDebugResValues UP-TO-DATE
:app:generateArmDebugResources UP-TO-DATE
:app:mergeArmDebugResources UP-TO-DATE
:app:processArmDebugManifest UP-TO-DATE
:app:processArmDebugResources UP-TO-DATE
:app:generateArmDebugSources UP-TO-DATE
:app:compileArmDebugJavaWithJavac UP-TO-DATE
:app:compileArmDebugSources UP-TO-DATE
:app:transformClassesWithJarMergingForArmDebug UP-TO-DATE
:app:collectArmDebugMultiDexComponents UP-TO-DATE
:app:transformClassesWithMultidexlistForArmDebug UP-TO-DATE
:app:transformClassesWithDexForArmDebug
PARSE ERROR:
unsupported class file version 52.0
...while parsing com/a/a/a.class
PARSE ERROR:
unsupported class file version 52.0
...while parsing com/a/a/b.class
2 errors; aborting
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForArmDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 39.744 secs
This android project can run well on another computer, but it can't run on current one .I hope you can help me solve this problem or give me some suggestions, thanks in advance.
Try adding this code to build.gradle > android
dexOptions {
javaMaxHeapSize "4g"
}
This error is related to com.google.firebase and com.google.android.gms dependencies.
Upgrade them to their latest versions and the issue will be resolved.
Update your Project build.gradle with:
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
and update all the com.google.firebase and com.google.android.gms in gradle file to newer version.
Maybe you make a new package in AndroidStudio with Camel case name. Sometimes make a crash and problem non-zero.
I just experienced the same issue. My fix was to:
"build > Clean project"
"build > Generate signed APK"
Then the build was succesful.
I had the dexOptions set as well in mij build.gradle file.
dexOptions {
javaMaxHeapSize "4g"
}

Gradle error after import module library

Here is what I got from the error message:
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:mockableAndroidJar, :library:prepareDebugUnitTestDependencies]
Error:Some file crunching failed, see logs for details
Error:Execution failed for task ':app:mergeDebugResources'.> Error: Some file crunching failed, see logs for details
Information:BUILD FAILED
Information:Total time: 3.008 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
message :
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.>
Error: Some file crunching failed, see logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.212 secs
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :library:generateDebugSources, :library:generateDebugAndroidTestSources, :library:mockableAndroidJar, :library:prepareDebugUnitTestDependencies]
Parallel execution with configuration on demand is an incubating feature.
Using the 'clean' task in combination with parallel execution may lead to unexpected runtime behavior.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:library:clean
:library:preBuild UP-TO-DATE
:library:preReleaseBuild UP-TO-DATE
:library:checkReleaseManifest
:library:preDebugAndroidTestBuild UP-TO-DATE
:library:preDebugBuild UP-TO-DATE
:library:preDebugUnitTestBuild UP-TO-DATE
:library:preReleaseUnitTestBuild UP-TO-DATE
:library:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:library:prepareComAndroidSupportAppcompatV72531Library
:library:prepareComAndroidSupportSupportCompat2531Library
:library:prepareComAndroidSupportSupportCoreUi2531Library
:library:prepareComAndroidSupportSupportCoreUtils2531Library
:library:prepareComAndroidSupportSupportFragment2531Library
:library:prepareComAndroidSupportSupportMediaCompat2531Library
:library:prepareComAndroidSupportSupportV42531Library
:library:prepareComAndroidSupportSupportVectorDrawable2531Library
:library:prepareReleaseDependencies
:library:compileReleaseAidl
:library:compileLint
:library:copyReleaseLint UP-TO-DATE
:library:mergeReleaseShaders
:library:compileReleaseShaders
:library:generateReleaseAssets
:library:mergeReleaseAssets
:library:mergeReleaseProguardFiles UP-TO-DATE
:library:packageReleaseRenderscript UP-TO-DATE
:library:compileReleaseRenderscript
:library:generateReleaseResValues
:library:generateReleaseResources
:library:packageReleaseResources
:library:processReleaseManifest
:library:bundleRelease
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:app:prepareComAndroidSupportAppcompatV72531Library
:library:checkDebugManifest
:app:prepareComAndroidSupportConstraintConstraintLayout101Library
:library:prepareDebugDependencies
:library:compileDebugAidl
:app:prepareComAndroidSupportDesign2531Library
:app:prepareComAndroidSupportRecyclerviewV72531Library
:app:prepareComAndroidSupportSupportCompat2531Library
:library:compileDebugRenderscript
:app:prepareComAndroidSupportSupportCoreUi2531Library
:app:prepareComAndroidSupportSupportCoreUtils2531Library
:app:prepareComAndroidSupportSupportFragment2531Library
:app:prepareComAndroidSupportSupportMediaCompat2531Library
:library:generateDebugBuildConfig
:app:prepareComAndroidSupportSupportV42531Library
:app:prepareComAndroidSupportSupportVectorDrawable2531Library
:library:generateDebugResValues
:app:prepareComAndroidSupportTransition2531Library
:library:generateDebugResources
:library:mergeDebugResources
:app:prepareComJakewhartonButterknife881Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:generateDebugResValues
:app:generateDebugResources
:app:mergeDebugResources
AAPT: libpng error: Not a PNG file
:library:processDebugManifest
:library:processDebugResources
Error: Some file crunching failed, see logs for details
:app:mergeDebugResources FAILED
How to solve it?
Check your drawable resource/images bundled. One of them or few of them might not be the proper .png files
AAPT: libpng error: Not a PNG file
Solution open the file which is not correct in an editor and save it with same name and correct .png extension.
You should comment org.gradle.parallel = true in gradle.properties.

react-native run-android failed with error: Execution failed for task ':app:dexDebug'

I'm using windows 8.1. with
react-native-cli: 1.0.0 and
react-native: 0.31.0
After adding react-native-maps to the project, I ran command react-native upgrade and given Y to all questions.
Then linked deps with rnpm link as well as come changes to MainApplication.java file too.
Here are changes to MainApplication.java:
// Other imports ...
import com.airbnb.android.react.maps.MapsPackage;
public class MainApplication extends Application implements ReactApplication {
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
#Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
#Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new MapsPackage() // I have added this for react-native-maps
);
}
};
#Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
}
Now I'm getting error when I run the command: react-native run-android
λ react-native run-android
JS server already running.
Running C:\Program Files (x86)\Android\android-sdk/platform-tools/adb reverse tcp:8081 tcp:808
1
Building and installing the app on the device (cd android && gradlew.bat installDebug...
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:react-native-maps:compileLint
:react-native-maps:copyReleaseLint UP-TO-DATE
:react-native-maps:preBuild UP-TO-DATE
:react-native-maps:preReleaseBuild UP-TO-DATE
:react-native-maps:checkReleaseManifest
:react-native-maps:preDebugAndroidTestBuild UP-TO-DATE
:react-native-maps:preDebugBuild UP-TO-DATE
:react-native-maps:preDebugUnitTestBuild UP-TO-DATE
:react-native-maps:preReleaseUnitTestBuild UP-TO-DATE
:react-native-maps:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:react-native-maps:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:react-native-maps:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
:react-native-maps:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
:react-native-maps:prepareComFacebookReactReactNative0310Library UP-TO-DATE
:react-native-maps:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:react-native-maps:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:react-native-maps:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:react-native-maps:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:react-native-maps:prepareReleaseDependencies
:react-native-maps:compileReleaseAidl UP-TO-DATE
:react-native-maps:compileReleaseRenderscript UP-TO-DATE
:react-native-maps:generateReleaseBuildConfig UP-TO-DATE
:react-native-maps:generateReleaseAssets UP-TO-DATE
:react-native-maps:mergeReleaseAssets UP-TO-DATE
:react-native-maps:generateReleaseResValues UP-TO-DATE
:react-native-maps:generateReleaseResources UP-TO-DATE
:react-native-maps:mergeReleaseResources UP-TO-DATE
:react-native-maps:processReleaseManifest UP-TO-DATE
:react-native-maps:processReleaseResources UP-TO-DATE
:react-native-maps:generateReleaseSources UP-TO-DATE
:react-native-maps:processReleaseJavaRes UP-TO-DATE
:react-native-maps:compileReleaseJavaWithJavac UP-TO-DATE
:react-native-maps:extractReleaseAnnotations UP-TO-DATE
:react-native-maps:mergeReleaseProguardFiles UP-TO-DATE
:react-native-maps:packageReleaseJar UP-TO-DATE
:react-native-maps:compileReleaseNdk UP-TO-DATE
:react-native-maps:packageReleaseJniLibs UP-TO-DATE
:react-native-maps:packageReleaseLocalJar UP-TO-DATE
:react-native-maps:packageReleaseRenderscript UP-TO-DATE
:react-native-maps:packageReleaseResources UP-TO-DATE
:react-native-maps:bundleRelease UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0310Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareNativeBaseDemoReactNativeMapsUnspecifiedLibrary UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
Unknown source file : at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file : at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file : at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file : at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file : at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file : at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : at com.android.dx.command.Main.main(Main.java:106)
:app:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException:
Process 'command 'C:\Program Files\Java\jdk1.8.0_102\bin\java.exe'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 50.673 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I have no idea about this error. Saw some questions similar to this but could not find the answer. I'm new to React-Native and Android development so I'm having hard time understanding this stuff.
This problem usually comes from gradle dependency in new components, i can see you have installed react-native-maps
you can solve it by cleaning the project.
In your React Native project:
cd android/ && ./gradlew clean
go back and try run it again.
cd .. && react-native run-android
to be more specific:
in your MainApplication.java file, change,
protected boolean getUseDeveloperSupport() { { <-----
on this
public boolean getUseDeveloperSupport() { <-----
that got it building for me, at least
The problem for me was that, the packager was running in the background from the previous build.
You might just try to close the packager server and start it with
react-native run-android
That was successful for my problem.
Use these steps
1.) cd android
2.) gradle clean
3.) Now run the project.
This error occurs in my system whenever the emulator is updated.
just run this from root of your project with cmd:
cd android && gradlew clean

Categories