This is related to gradle wrapper and the reason is something related to gradle wrapper is broken or deleted from the project. This issue might appear on an Android project as well. compile files('libs/android-support-v4.jar')Ĭompile fileTree(dir: 'libs', include: '*. Gradle error: Could not find or load main class : I faced this issue on a react native project. Then right click on the jar file -> Add as library.Ĭompile files('libs/android-support-v4.jar') Solution 2ĭrag and drop the jar file into libs of the project (click ok to copy etc.). You can try importing Facebook's ant build.xml some where instead and report how you get on, but I found I was getting target redeclaration errors when I already had this error to resolve. ![]() All being well you'll be much closer to solving this. This might not solve everything for you but I think these were the key steps that helped me, especially step 4. gradlew build from the parent path.Īfter this clean up the dependencies in Android Studio, set the absolute apk path for your Echo project in Android Studio. Check the Facebook.iml file, you want the exported dependency. ![]() For instance, compile fileTree(dir: 'libs', include: '*.jar', exclude: 'android-support-v4.jar'). Īdd the dependency on Facebook to your main project, 'Echo', by opening its adle file and adding compile project(':Facebook') to the dependencies.īoth Echo and Facebook might depend on the android support library by now remove this dependency from your Echo project. Modify the adle file of the parent project, so that it contains include ':Facebook'. Method 2: Sync your project with Gradle files This issue will not be solved if the folder containing Gradle files is deleted or corrupted. After restarting your Android Studio the Gradle issue will be fixed. Check that its Android facet is indeed a library module.Īdd all the necessary source, resource, manifest, and property files to this new module in the appropriate locations. In this click on Invalidate Caches and Restart option to Restart your Android Studio project. Now is a good time to talk about some Gradle parameters that have been mismatched or left unexplained in other tutorials I’ve seen. ![]() From within Android Studio, navigate to Settings -> Plugins -> Browse Repositories and search for Android Studio Unit Test. ![]() Move the Facebook SDK project to some remote location.Ĭreate a new Android library module in the parent Gradle project. Then we need to install the Android Studio plugin. We encountered the exact same problem at roughly the same time, and this is how I went about resolving it in my case.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |