Cannot evaluate module react-native-baidu-map : Configuration with name 'default' not found.
2018-03-15 15:52
661 查看
报错内容:
Cannot evaluate module react-native-baidu-map : Configuration with name 'default' not found.
原因:
执行命令:npm install
Here is my settings:1. android/app/build.gradle
Cannot evaluate module react-native-baidu-map : Configuration with name 'default' not found.
原因:
执行命令:npm install
Here is my settings:1. android/app/build.gradle
dependencies { compile project(':react-native-maps') }2. android/settings.gradle
include ':react-native-maps' project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/android')3. MainApplication.java
package com.package; import android.app.Application; import android.util.Log; import com.facebook.react.ReactApplication; import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List; import com.AirMaps.AirPackage; // <- Add this line import com.i18n.reactnativei18n.ReactNativeI18n; import com.oblador.vectoricons.VectorIconsPackage; 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 AirPackage(), // <- Add this line new MainReactPackage(), new ReactNativeI18n(), new VectorIconsPackage() ); } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } }4. AndroidManifest.xml
<application android:name=".MainApplication" android:allowBackup="true" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:theme="@style/AppTheme"> <!--reference your google_map_id--> <meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/google_map_id"/> </application>shareimprove this answer
相关文章推荐
- Error:Configuration with name 'default' not found. 解决办法 (React Native项目)
- 【原】React Native踩坑系列之--Configuration with name 'default' not found react-native
- 开发错误11:Configuration with name ‘default’ not found
- Error:Configuration with name 'default' not found.解决方案
- Error:Configuration with name 'default' not found.
- 导入工程时提示Error:Configuration with name ‘default’ not found.解决方法
- Android studio Gradle Error:Configuration with name 'default' not found.
- Error:Configuration with name 'default' not found. 解决办法
- Android Studio,Error:Configuration with name 'default' not found.
- Error:Configuration with name ‘default’ not found
- 【git】Error:Configuration with name 'default' not found.
- Configuration with name 'default' not found.
- 解决编译时Error:Configuration with name 'default' not found.的问题
- android studio svn 更改依赖包名后 报错 Gradle Configuration with name 'default' not found
- 报错(Error:Configuration with name 'default' not found.)
- androidStudio Error:Configuration with name 'default' not found.
- 报错(Error:Configuration with name 'default' not found.)
- Error:Configuration with name 'default' not found.
- Configuration with name 'default' not found
- Error:Configuration with name 'default' not found. 解决办法