(write your answer here)
Yes
Yes
Environment:
OS: macOS Sierra 10.12.6
Node: 7.9.0
Yarn: Not Found
npm: 4.5.0
Watchman: 4.7.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 2.3 AI-162.3871768
Packages: (wanted => installed)
react: 16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3
react-native initmale_02.obj and male_02.mtl). The easiest is to find a png and a jpg and name them the same.require("./test_image.png") and require("./test_image.jpg")Both files are loaded into the app bundle and accessible by the application
Get an error complaining that the resource entry is already defined:
res/drawable-mdpi-v4/js_res_male02.obj:0: error: Resource entry js_res_male02 is already defined.
res/drawable-mdpi-v4/js_res_male02.mtl:0: Originally defined here.
This is because React Native copies resources into Android's res directory vs assets and it seems like the res directory ignores file extensions. Seems to me there are two ways around this, encode file extensions into the resource name or (ie. js_res_male_obj) or move to assets.
iOS release builds do not have this issue. Also if I rename male02.obj to male02_model.obj then it works just fine. However this presents a more annoying issue when my obj/fbx model has multiple materials/textures with the same name (but different extensions).
Full gradle output:
~/third-workspace/TestPackage/android$ ./gradlew assembleGvrRelease
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preGvrReleaseBuild UP-TO-DATE
:app:checkGvrReleaseManifest
:app:preGvrDebugBuild UP-TO-DATE
:app:preOvrDebugBuild UP-TO-DATE
:app:preOvrReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2500Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2500Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0493Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareComGoogleAndroidExoplayerExoplayerR220Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareTestPackageArcore_clientUnspecifiedLibrary UP-TO-DATE
:app:prepareTestPackageGvr_commonUnspecifiedLibrary UP-TO-DATE
:app:prepareTestPackageReact_viroUnspecifiedLibrary UP-TO-DATE
:app:prepareTestPackageViro_rendererUnspecifiedLibrary UP-TO-DATE
:app:prepareGvrReleaseDependencies
:app:compileGvrReleaseAidl
:app:compileGvrReleaseRenderscript UP-TO-DATE
:app:generateGvrReleaseBuildConfig
:app:mergeGvrReleaseShaders UP-TO-DATE
:app:compileGvrReleaseShaders UP-TO-DATE
:app:generateGvrReleaseAssets UP-TO-DATE
:app:mergeGvrReleaseAssets UP-TO-DATE
:app:generateGvrReleaseResValues UP-TO-DATE
:app:generateGvrReleaseResources UP-TO-DATE
:app:mergeGvrReleaseResources UP-TO-DATE
:app:bundleGvrReleaseJsAndAssets
Loading dependency graph, done.
warning: the transform cache was reset.
bundle: start
bundle: finish
bundle: Writing bundle output to: /Users/andychu/third-workspace/TestPackage/android/app/build/intermediates/assets/gvr/release/index.android.bundle
bundle: Done writing bundle output
bundle: Copying 8 asset files
bundle: Done copying assets
:app:processGvrReleaseManifest
:app:processGvrReleaseResources
res/drawable-mdpi-v4/js_res_male02.obj:0: error: Resource entry js_res_male02 is already defined.
res/drawable-mdpi-v4/js_res_male02.mtl:0: Originally defined here.
:app:processGvrReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processGvrReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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: 27.808 secs
If need be, I can provide one, but the repro instructions above are pretty simple.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
same error here !.
With png and jpg images with the same name.
What I did to fix it is:
1.- Rename the files with different names
2.- Clean your android project running:
cd android && ./gradlew clean
@sejas I did the same thing because i was tired of having this issue and not a single command line to solve it automaticly
Most helpful comment
What I did to fix it is:
1.- Rename the files with different names
2.- Clean your android project running: