Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Configuration with name 'default' not found. (android) #227

Closed
1 of 4 tasks
dstnation opened this issue Jul 3, 2016 · 17 comments
Closed
1 of 4 tasks

Fix: Configuration with name 'default' not found. (android) #227

dstnation opened this issue Jul 3, 2016 · 17 comments
Assignees

Comments

@dstnation
Copy link

dstnation commented Jul 3, 2016

  • Issue does not already exist
  • Identify exactly what aspect your issue is about
    • ignite base application
    • ignite the cli
    • ignite generated code

maybe this error from rnpm link (react-native-maps);

new version of ignite-generator includes map example;
if you get error (Gradle sync failed: Configuration with name 'default' not found.) after run "react-native run-androud"

try change Manually in './android/app/build.gradle'

dependencies {
//compile project(':react-native-maps') //rnpm link error
compile 'com.airbnb.android:react-native-maps:0.6.0'
}

@GantMan
Copy link
Member

GantMan commented Jul 3, 2016

Thanks!

@kevinvangelder - please note the above for when RNMaps and 0.29 come to play, we should take this into account.

@thejoker101
Copy link

FWIW, I also had to change this bit in MainActivity.java:

//new MapsPackage(),
new MapsPackage(this),

@sudharsan1988
Copy link

@GantMan , I followed the above steps but I am still getting the below errors during build,

E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:6: error: cannot find symbol
import com.facebook.react.ReactApplication;
^
symbol: class ReactApplication
location: package com.facebook.react
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:8: error: cannot find symbol
import com.facebook.react.ReactNativeHost;
^
symbol: class ReactNativeHost
location: package com.facebook.react
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:15: error: cannot find symbol
public class MainApplication extends Application implements ReactApplication {
^
symbol: class ReactApplication
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:17: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:32: error: cannot find symbol
public ReactNativeHost getReactNativeHost() {
^
symbol: class ReactNativeHost
location: class MainApplication
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainActivity.java:9: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity
public class MainActivity extends ReactActivity {
^
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:17: error: cannot find symbol
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
^
symbol: class ReactNativeHost
location: class MainApplication
E:\react\MyBeta\android\app\src\main\java\com\mybeta\MainApplication.java:31: error: method does not override or implement a method from a supertype
@OverRide
^
8 errors
:app:compileDebugJava FAILED

FAILURE: Build failed with an exception.

@skellock
Copy link
Contributor

skellock commented Jul 6, 2016

Until react-native-maps fixes an issue with their current version, there's some manual steps that need to be performed on Android:

https://github.com/lelandrichardson/react-native-maps/issues/331#issuecomment-229066704

@GantMan
Copy link
Member

GantMan commented Jul 6, 2016

Sorry for the early merge @sudharsan1988

We get excited sometimes.

@koustuvsinha
Copy link

I have the same problem as @sudharsan1988, but working though the steps provided by @skellock didnt solve it, back to same issue. The step I couldn't do is this one :

Next, open android/src/main/java/com//MainActivity.java and change new MapsPackage() to the old style new MapsPackage(this).

In the base app made by ignite, there is no such line in MainActivity.java

@skellock
Copy link
Contributor

skellock commented Jul 6, 2016

@koustuvsinha sounds like rnpm didn't link. Are you seeing the same maven isssue as @sudharsan1988 too?

@skellock skellock added bug and removed Informative! labels Jul 6, 2016
@skellock skellock self-assigned this Jul 6, 2016
@koustuvsinha
Copy link

koustuvsinha commented Jul 6, 2016

@skellock yes exactly the same error output on react-native run-android :

:app:compileDebugJavaWithJavac
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:6: error: cannot find symbol
import com.facebook.react.ReactApplication;
                         ^
  symbol:   class ReactApplication
  location: package com.facebook.react
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:8: error: cannot find symbol
import com.facebook.react.ReactNativeHost;
                         ^
  symbol:   class ReactNativeHost
  location: package com.facebook.react
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:15: error: cannot find symbol
public class MainApplication extends Application implements ReactApplication {
                                                            ^
  symbol: class ReactApplication
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:17: error: cannot find symbol
  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                ^
  symbol:   class ReactNativeHost
  location: class MainApplication
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:32: error: cannot find symbol
  public ReactNativeHost getReactNativeHost() {
         ^
  symbol:   class ReactNativeHost
  location: class MainApplication
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainActivity.java:10: error: MainActivity is not abstract and does not override abstract method getPackages() in ReactActivity
public class MainActivity extends ReactActivity {
       ^
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:17: error: cannot find symbol
  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
                                                       ^
  symbol:   class ReactNativeHost
  location: class MainApplication
/home/koustuv/Projects/react-native-apps/PeopleManager/android/app/src/main/java/com/peoplemanager/MainApplication.java:31: error: method does not override or implement a method from a supertype
  @Override
  ^
8 errors
:app:compileDebugJavaWithJavac FAILED

Even after rnpm is linked :

react-native link react-native-maps
rnpm-link info Android module react-native-maps is already linked 
rnpm-link info iOS module react-native-maps is already linked 

@darron-haworth
Copy link

darron-haworth commented Jul 6, 2016

I got this working with the following configuration:
build.gradle @android/app/build.gradle

//compile project(':react-native-maps') Comment this out, then add line below
compile 'com.airbnb.android:react-native-maps:0.6.0'

MainActivity.java @android/app/src/main/java/com/projectName/MainActivity.java
//change new MapsPackage() to:
new MapsPackage(this)
AndroidManifesxt.xml (Add your api key) @android/app/src/main/AndroidManifest.xml
<meta-data android:name="com.google.android.geo.API_KEY" android:value= "YourApiKeyHere"/>

@GantMan
Copy link
Member

GantMan commented Jul 6, 2016

Thanks for the info 👍

@koustuvsinha
Copy link

@darron-haworth Where do you get the MainActivity.xml in the project?

@skellock
Copy link
Contributor

skellock commented Jul 6, 2016

This is what's new in 0.29.

@skellock
Copy link
Contributor

skellock commented Jul 6, 2016

We're tracking this here.

facebook/react-native#8603

Trying to get more info.

@darron-haworth
Copy link

@koustuvsinha , I updated my comment with the paths. (it was a .java file, not a .xml file on the MainActivity) - Hope it helps

@tminard
Copy link
Contributor

tminard commented Jul 7, 2016

I too am experiencing the same issues as @koustuvsinha - once I apply the fix by @skellock I am able to progress past the missing configuration issue on React 0.28, but then immediately hit the same wall of missing symbol errors. I am able to run a raw react-native (0.28) project on Android, however.

@skellock
Copy link
Contributor

skellock commented Jul 7, 2016

The problem we're having here is when ignite calls react-native init on your behalf, it grabs the latest React Native template. Which is the 0.29 structure. But we're only targeting 0.28.

We've got another issue filed to "control" what react-native init emerges.

Should be coming today.

@GantMan
Copy link
Member

GantMan commented Jul 7, 2016

Fixed as of 1.2.1, sorry for the issue.
https://github.com/infinitered/ignite/releases/tag/1.2.1

@GantMan GantMan closed this as completed Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants